Commit 22d1674
authored
Syntax highlighting using Prism.parse_lex (#1704)
Completely drops ripper dependency.
### Drops `ruby-node` css class used to colorize dstring and backref
backref(`$&`) is now colored as identifier, same as global variable.
dstring(`"#{expr}"`, `` `#{expr}` ``) is now colored as string. Embedded
expression parts are colored separately.
### Stops token squashing:
`"string"` was a single string token. Changed to `"` + `string` + `"`
`"string#{:symbol}"` was a single dstring token. Changed to string
tokens `"` `string` `#{` `}` `"`. `:` and `symbol is colorized as symbol
color.
So there should be lots of diff.
Before
<img width="759" height="278" alt="before"
src="https://github.com/user-attachments/assets/6ff20691-082f-42d4-b4f1-25131f8c508b"
/>
After
<img width="767" height="287" alt="after"
src="https://github.com/user-attachments/assets/b2a80eb3-aab9-4b4e-8585-918931b2e4eb"
/>
### Fix some unkown bugs
```ruby
# Documenting this code crashed
def foo
<<~A; :\
A
b
end
```1 parent fb15250 commit 22d1674
12 files changed
Lines changed: 544 additions & 402 deletions
File tree
- lib/rdoc
- generator
- template
- aliki/css
- darkfish/css
- markup
- parser
- test/rdoc
- markup
- parser
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | 128 | | |
132 | 129 | | |
133 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
1025 | 1024 | | |
1026 | 1025 | | |
1027 | 1026 | | |
| |||
1037 | 1036 | | |
1038 | 1037 | | |
1039 | 1038 | | |
1040 | | - | |
1041 | 1039 | | |
1042 | 1040 | | |
1043 | 1041 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | 452 | | |
454 | 453 | | |
455 | 454 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
321 | 322 | | |
322 | 323 | | |
323 | 324 | | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
324 | 334 | | |
325 | 335 | | |
326 | 336 | | |
327 | 337 | | |
328 | 338 | | |
329 | 339 | | |
330 | 340 | | |
331 | | - | |
332 | | - | |
333 | 341 | | |
334 | 342 | | |
335 | 343 | | |
336 | 344 | | |
337 | | - | |
338 | | - | |
339 | | - | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
| |||
This file was deleted.
0 commit comments