Bug: Inline comment ending a line prevents ignoring of multiline comment later in file
See original GitHub issueDescribe the Bug
This is related to #223 and #269 and is a minimal repro of the issue I was commenting on at the bottom of #223. Multiline comments are not successfully ignored if an inline comment earlier in the file ends a line. Putting a space between inline comment and linebreak does not fix this, putting text between does.
How to Reproduce
Set “paragraph blank lines” rule on OR set “two spaces between lines with content” on. (Not both.)
%% fold %%
## R
%%
HW:: --
T:: 0
%%
Expected Behavior
Linter output for the bottom of the file (starting ## R
) should be the same as if the input was:
%% fold %% notComment
## R
%%
HW:: --
T:: 0
%%
Device
- Desktop
Note: The file initially had a second multiline block comment above the inline comment which was successfully ignored by both “paragraph blank lines” and “two spaces between lines with content” rules.
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
How to put a line comment for a multi-line command [duplicate]
The best you can do is a comment on the lines before the command, or one single comment at the end of the...
Read more >Can I comment a block of lines in an MATLAB file using ...
You can comment out a block of code in MATLAB using the block comment operators, %{ and %}. The %{ and %} operators...
Read more >How To Write Comments in Go - DigitalOcean
Inline comments occur on the same line of a statement, following the code itself. Like other comments, they begin with a set of...
Read more >Comments in programming languages
An end-of-line comment terminates at the end of the line. A block line comment has a terminator and can continue for several lines,...
Read more >JavaScript Comments - W3Schools
Any text between /* and */ will be ignored by JavaScript. This example uses a multi-line comment (a comment block) to explain the...
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
I have a fix in place for the above, but I am guessing I should see about being a little more thorough on ignoring obsidian multiline comments. At this time, obsidian single line comments are not ignore by the linter.
I am guessing the following scenarios would need modification to make sure they do not cause issues:
Do you think these need fixing @AnnaKornfeldSimpson ?
Thanks for all of the feedback and help pointing out issues.
This issue should be resolved on master. Please let us know if this is not resolved on master or in the next release.