Commit 31f939f
authored
feat: add support for user comments in presentation rendering (#773)
I've found the function `should_ignore_comment` and have been relying on
it to add user comments inside presentations by abusing the `<!-- vim:
comment here -->` since I don't use vim for this anyways.
This isn't clean and a dedicated way to comment should be added IMO.
Also, there is an issue with the hacky vim solution above, it adds a
newline where the comment should be ignored; fixed by using
`self.slide_state.ignore_element_line_break = true` on ignored comments.
Current comments:
<img width="770" height="465" alt="image"
src="https://github.com/user-attachments/assets/f0a3aa41-1b90-463f-917b-416731b8a207"
/>
PR with ignore line breaks:
<img width="751" height="414" alt="image"
src="https://github.com/user-attachments/assets/f242463e-51f2-45f1-a5a1-69b014175d41"
/>File tree
3 files changed
+28
-3
lines changed- docs/src/features
- examples
- src/presentation/builder
3 files changed
+28
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
152 | 171 | | |
153 | 172 | | |
154 | 173 | | |
| |||
216 | 235 | | |
217 | 236 | | |
218 | 237 | | |
219 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| |||
42 | 44 | | |
43 | 45 | | |
44 | 46 | | |
| 47 | + | |
45 | 48 | | |
46 | 49 | | |
47 | 50 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
| 155 | + | |
153 | 156 | | |
154 | 157 | | |
155 | 158 | | |
| |||
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
| 211 | + | |
208 | 212 | | |
209 | 213 | | |
210 | 214 | | |
| |||
290 | 294 | | |
291 | 295 | | |
292 | 296 | | |
| 297 | + | |
293 | 298 | | |
294 | 299 | | |
295 | 300 | | |
| |||
301 | 306 | | |
302 | 307 | | |
303 | 308 | | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
304 | 312 | | |
305 | 313 | | |
306 | 314 | | |
| |||
0 commit comments