humanmade / humanmade/h2

Broken markup after editing a post with a DocBlock (in code)

Open
#337 2 comments 0 reactions 0 assignees View on GitHub
Bug Medium priority
Dominant language
JavaScript
Stars
8
Forks
1
Avg merge
1d 9h
Merged PRs (30d)
7

Description

I wrote a post including a fenced code block (i.e., triple backticks). The code in that block included a DocBlock, like so:

```
/**
* Blabla here...
*
* Some more blabla...
*/
```

After I published the post, it looked all good.

Then I **edited** it (from the frontend, **not** WordPress backend), changed a small bit, and saved again ... and then it was all broken.

H2 seemed to interpret the ` * ...` lines in the content (already HTML) as markdown lists, and it all broke.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.