Linting inside Markdown blocks outside of .md files
See original GitHub issueIs it possible to get linting inside of Markdown-like blocks inside of non-Markdown files? The use case here is in Elixir documentation, which is formatted in Markdown, but it’s actually just a block inside of a .ex
or .exs
file.
From the above link, an example:
defmodule MyApp.Hello do
@moduledoc """
This is the Hello module.
"""
@doc """
Says hello to the given `name`.
Returns `:ok`.
## Examples
iex> MyApp.Hello.world(:john)
:ok
"""
def world(name) do
IO.puts "hello #{name}"
end
end
What’s between the """
of @moduledoc
and @doc
(and also, though not shown, @typedoc
) is formatted with Markdown. Getting the warnings and/or, if possible, the auto-formatting inside of those blocks would be tremendous!
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:11 (5 by maintainers)
Top Results From Across the Web
markdownlint/Rules.md at main - GitHub
A Node.js style checker and lint tool for Markdown/CommonMark files. - markdownlint/Rules.md at main · DavidAnson/markdownlint.
Read more >How to disable linting in Markdown script tags.
For external linters it's easy: just create custom Scope where you would list all such "excluded" files and then add a rule for...
Read more >Markdownlint - Visual Studio Marketplace
To lint all Markdown files in the current workspace, run the markdownlint.lintWorkspace command (from the Command Palette or by binding it to a ......
Read more >How to link to part of the same document in Markdown?
Github automatically parses anchor tags out of your headers. So you can do the following: [Custom foo description](#foo) # Foo. In the above...
Read more >Cheat Sheet | Marfeel Docs
Links to other markdown files should always contain the .md extension, ... to highlight language syntax in Markdown code blocks, using coloured text....
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
Bummer. That’s definitely how I’d want to go about this. I’ll leave the issue open, but please don’t hold your breath. 😃
Here’s a grammar injection approach https://github.com/mjbvz/vscode-comment-tagged-templates.