hackmdio / hackmdio/hackmd-io-issues

Code blocks (```) inside HTML tags lack syntax highlighting

Open
#262 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
40
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### Is this a hackmd.io issue?

- [x] Yes, the bug happens on https://hackmd.io
- [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd

### What's the problem

Code blocks that specify language normally get syntax highlighting according to that language. This breaks when using a code block inside a literal HTML tag, even though the rendering works fine.

#### Current behaviour

Reproduce with the following content:
~~~markdown
## Example

Component diagram

```javascript
console.log("hello");
```

~~~

Compare with screenshot:

Screen Shot 2021-06-16 at 6 32 57 PM

#### Expected behaviour

The code block should be highlighted, like how Github does in the example above.

#### Environment

I use HackMD on:

**Desktop**
- OS: macOS
- Browser: Chromium-like
- Browser Version: 91.0.4472.106

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.