Commit 7740aaa
committed
fix(docs): allow hyphens in fenced codeblock language (#2437)
The fenced-codeblock language regexes in render.ts and text.ts matched
\w which excludes `-`, so languages like `glimmer-ts`, `vue-html`, and
`objective-c` were truncated: the `-ts` suffix was stripped off the
language and leaked into the top of the code body, breaking Shiki
highlighting.
Swap `\w` for `[\w-]` in the three affected regexes and add a
regression test covering `glimmer-ts`.
Fixes #24371 parent e331d86 commit 7740aaa
File tree
3 files changed
+14
-3
lines changed- server/utils/docs
- test/unit/server/utils/docs
3 files changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
109 | | - | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
296 | 307 | | |
297 | 308 | | |
298 | 309 | | |
| |||
0 commit comments