DEV Community

Discussion on: Two highlight problems on dev.to

Collapse
djuber profile image
Daniel Uber

Hi Michel,

I can definitely recreate the issue with the yaml front matter being elongated (more dashes than you added) - this appears to be a bug in forem's rendering of the code block.

I've filed a bug report at github.com/forem/forem/issues/15832 with this problem and a reproduction case. A good resource is forem.dev, if you have questions or problems with the software to share, and the github issues for forem (the software powering DEV) is the right place to share bugs like this.

We've seen this behavior before, and had fixed it in the past, this might be a situation where the fix only applied to the first code block, or a regression since that was done.

I did notice that "markdown" as a code highlight syntax doesn't highlight the yaml block the way you'd expect - "yaml" does, but this might not be what you want (since it's going to treat the body of the embedded markdown as syntactically special). There's probably some limit to how featureful a nested markdown document inside a code block can be -- I would not be surprised if the software got into the wrong state if a code block were embedded within a mardown document inside a code block.

Collapse
michelc profile image
Michel Author

Thank you for your answer and the bug report.

And it seems that the frontmatter in the first block is correctly highlighted.

Collapse
michelc profile image
Michel Author

Thank you very much Daniel for solving this little problem so quickly.