question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Counter-intuitive behavior after enable/disable + bug with ignore next line.

See original GitHub issue

So I just ran into two separate issues. I was trying to disable an error for a really long iframe embed that I am including in my markdown but was running into all sorts of trouble. I think I was dealing with two separate bugs which is what made it all the more confusing

It seems that if you do the following, it re-enables all the previous ignored rules including deprecated rules such as MD002.

<!-- markdownlint-disable -->
<iframe>Some really long iframe snippet</iframe>
<!-- markdownlint-enable -->

If you instead try to use disable next line in the presence of front-matter, the line does not actually get disabled since it is not offset in the code by the length of the front matter. (I put together a pull request for this issue https://github.com/DavidAnson/markdownlint/pull/469)

<!-- markdownlint-disable-next-line -->
<iframe>Some really long iframe snippet</iframe>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
DavidAnsoncommented, Dec 19, 2021

I think that’s what you did with #469?

0reactions
DavidAnsoncommented, Dec 23, 2021

Closing this, applying the PR in #469.

Read more comments on GitHub >

github_iconTop Results From Across the Web

tslint:disable-next-line should ignore subsequent comments
Bug Report TypeScript code being linted Basically, I wanna do this: // tslint:disable-next-line:no-any very very long explanation // on why ...
Read more >
Turning off eslint rule for a specific line
To disable next line: // eslint-disable-next-line no-use-before-define var thing = new Thing();. Or use the single line syntax: var thing = new Thing(); ......
Read more >
Debugging with gdb - Stopping and Continuing
Inside GDB, your program may stop for any of several reasons, such as a signal, a breakpoint, or reaching a new line after...
Read more >
Wno-unused-parameter has no effect when used with -W
This bug happens regardless of whether -W comes before or after -Wno-unused-parameters on the command line. The desired behavior should be ...
Read more >
Debugging with GDB - Stopping and Continuing
Inside GDB, your program may stop for any of several reasons, such as a signal, a breakpoint, or reaching a new line after...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found