Open marcofranssen opened 3 years ago
I suppose you have to put the code node and the title node in a container, which ensures the title and the code will be together.
If you want them in a div container, you can check new npm package remark-flexible-code-titles out.
**remark-flexible-code-titles**
does the same thing with remark-code-titles
, but offers additional options to add container element as well. You can also customize the tag name and classnames.
Problem
See this blog, the code title gets disconnected from the code-block itself.
https://marcofranssen.nl/how-to-do-enums-in-go
In top it shows a code title
However this title was intended for a codeblock that is way below in the blogpost embedded in a quotation block.
Reproduce
Blog markdown extract
The remark processing pipeline looks like this.