Reference link double on format
See original GitHub issueOn 2 or more save of a file, two list of references are generated. One outside off the begin/end tag and one in. I get really inconsistent results with setting in and out of the workspace but never one where it works.
Steps to Reproduce the Bug or Issue
- create a file with a wikilink to an exisiting file like:
# Python style guide
We use the [[Guidelines/Python-style-guide]] with some modifications.
[//begin]: # "Autogenerated link references for markdown compatibility"
[Guidelines/Python-style-guide]: ../../Guidelines/Python-style-guide "Python language rules"
[//end]: # "Autogenerated link references"
- Press control S and you get
# Python style guide
We use the [[Guidelines/Python-style-guide]] with some modifications.
[Guidelines/Python-style-guide]: ../../Guidelines/Python-style-guide "Python language rules"
[//begin]: # "Autogenerated link references for markdown compatibility"
[Guidelines/Python-style-guide]: ../../Guidelines/Python-style-guide "Python language rules"
[//end]: # "Autogenerated link references"
Expected behavior
You should get
# Python style guide
We use the [[Guidelines/Python-style-guide]] with some modifications.
[//begin]: # "Autogenerated link references for markdown compatibility"
[Guidelines/Python-style-guide]: ../../Guidelines/Python-style-guide "Python language rules"
[//end]: # "Autogenerated link references"
I have tried blocking all rules in mardownlint.config
but it changed nothing
Issue Analytics
- State:
- Created 10 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How should I format my references in APA Style? - WriteAnswers
Unless your program or instructor directs you to do otherwise, your references should be double spaced (APA, 2020, p. 303).
Read more >APA 7th Edition Style Guide: Formatting Your Paper
Use double-spacing throughout the entire paper.To add double-spacing in Microsoft Word, highlight all the text you want double-spaced, ...
Read more >How to Break or Split URLs (Web Addresses) Across Lines in ...
If you have any citations in your references list that include web site ... break naturally on a hyphen, technically that is not...
Read more >APA Reference Page Examples and Format Guide
The reference citations are double spaced with no additional lines between them. References that go past the first line have a hanging indent....
Read more >General Format - Purdue OWL
Your essay should be typed and double-spaced on standard-sized paper (8.5" x ... four major sections: the Title Page, Abstract, Main Body, and...
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
@MalcolmMielle I assume you are using VS Code. If I create a new Markdown document with the content you show above and run the “Fix all supported markdownlint violations in the document” command, I get the following as expected:
If you want to leave the “//begin” and “//end” comments alone, the following configuration does so:
With that configuration in place, no issues are reported/fixed.
This all seems correct. If you see otherwise, please try running the markdownlint fix command as I am directly - you may have another extension trying to apply fixes on save and interfering.
I’m using the latest VS Code and markdownlint extension v0.48.1.
Glad you got this sorted out! I will have a look anyway, because this behavior is not expected. That rule is trying to remove the two definitions above and below that line and it works fine individually (see playground below). I can’t test bulk fix from my phone, but will do so later. However, even with a bug, I don’t understand how you would end up with two copies of the reference that isn’t being removed.
https://dlaa.me/markdownlint/#%25m%23 Python style guide We use the [[Guidelines%2FPython-style-guide]] with some modifications. [%2F%2Fbegin]%3A %23 "Autogenerated link references for markdown compatibility" [Guidelines%2FPython-style-guide]%3A ..%2F..%2FGuidelines%2FPython-style-guide "Python language rules" [%2F%2Fend]%3A %23 "Autogenerated link references"