highlightjs / highlightjs/highlight.js
(markdown) snake_case term causes italics in rest of file
- Dominant language
- JavaScript
- Stars
- 25k
- Forks
- 3.8k
- Avg merge
- 11h 35m
- Merged PRs (30d)
- 3
Description
**Describe the issue**
If you have an unescaped term in snake_case in a Markdown file, it puts highlight.js into "italic mode" when it should not. GitHub-Flavored Markdown (GFM) and others seem to not italicize underscores in the middle of a word.
**Which language seems to have the issue?**
- markdown
**Are you using `highlight` or `highlightAuto`?**
- `highlight`
**Sample Code to Reproduce**
https://jsfiddle.net/mn15jwg7/
```
Header_under
code listing; italic
More text, still italic.
```
Here's how highlight.js renders it on the playground. Note how the `_` puts it into Italic mode and it never leaves, even in subsequent blocks:
Here's how GitHub renders the same markdown:
Contributor guide
Assessment
This issue has not been assessed yet.