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.

Markdown Validation

See original GitHub issue

I’m trying to integrate some basic markdown parsing / validation in my build process which is used to validate a hand-written CHANGELOG.md file. From time to time I see colleagues make small mistakes where I wish I’d have a tool that would automatically flag these issues and break my build, things like invalid links (Foo(https://...) instead of ([Foo](https://...)), missing whitespace (-something instead of - something), stuff like that.

Is there any kind of “strict” option in the parser that I missed where the parser would bail out on inconsistencies / issues like this? If not, would it be feasible to implement such a thing or is the markdown spec too loose for any validation check?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
vschcommented, Apr 7, 2020

@realdadfish, as a future implementation you can make the rules extensible so that a RegEx based validator is available and applied to Node via Node.getChars(), other node specific validators can be RegEx based or code based for maximum flexibility and would specify node classes to which they apply.

Then the configuration would consist of configuring a list of rules and visiting the document.

0reactions
realdadfishcommented, Apr 8, 2020

OK, thanks for the pointers, I’ll see with what I can come up with. Will close this for now. Thanks again!

Read more comments on GitHub >

github_iconTop Results From Across the Web

mattbriggs/markdown-validator - GitHub
Validate and parse document structure created in markdown. Validation uses a set of declarative rules. Formats assume markdown used with static such ...
Read more >
Markdown Live Preview
This is the online markdown editor with live preview.
Read more >
Validate your Markdown files | DocFX website - NET
Validate your Markdown files. In Markdown, it is possible to write any type of content, as long as the used syntax is valid....
Read more >
Validate Markdown Files With MarkdownLint - Matthew Setter
How do you know that your Markdown content is valid? You use MarkdownLint! In this post, I step through how to install, configure, ......
Read more >
Automatic Validation in Markdown Documents
Markdown documents are validated automatically as you type. The conversion engine constantly tries to parse your changes to display the results in the ......
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