Commented line inside fenced code block causing problems
See original GitHub issueDescription
I have a fenced code block that looks like this
// express-fs-router/index.js
switch (typeof handler) {
case 'function': {
// export default function(req, res) {}
}
case 'object': {
if (Array.isArray(handler) && handler.length) {
// export default [function(req, res, next) {}, function(req, res) {}]
}
}
}
which is ultimately rendered as
Later in the same file I have a very similar fenced code block that does not cause a similar issue
// express-fs-router/index.js
switch (typeof handler) {
case 'function': {
// export default function(req, res) {}
}
case 'object': {
if (Array.isArray(handler) && handler.length) {
// export default [function(req, res, next) {}, function(req, res) {}]
// get HTTP method from handler function name
if (!method) method = handler[handler.length - 1].name
// set to router
router[method](route, ...handler)
}
}
}
which renders as
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Markdown fails to render code blocks with blank lines when ...
GitLab flavored markdown wrongly terminate fenced code blocks when 1) block contains blank lines (which is frequent in code) AND 2) code ...
Read more >Insist that code fenced blocks are properly closed - Spec
A fenced code block could not be stopped by a paragraph, so the ending fence would be necessary to distinguish the end of...
Read more >How to add comments to fenced code block within doxygen ...
Try with \code \code{.cpp} class Cpp {}; \endcode.
Read more >Escaping Markdown Code Snippets and Inline Code as ...
Another related issue is escaping of the back tick character ` in an inline code block. The problem here is that the `...
Read more >Implement ```-style (fenced) Markdown code blocks
The problem will grow bigger when combining with a list and long lines of code. – aldok. Jan 23, 2018 at 2:28. Add...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ekhaled thanks for the link! Disabling
hotReload
in the svelte-loader options resolved the issue, interesting! @pngwn is this okay to close now that we have a resolution?Sure thing.