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.

Linting inside Markdown blocks outside of .md files

See original GitHub issue

Is 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:open
  • Created 6 years ago
  • Reactions:5
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
DavidAnsoncommented, Jan 17, 2018

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. 😃

0reactions
texastolandcommented, Aug 3, 2018

Here’s a grammar injection approach https://github.com/mjbvz/vscode-comment-tagged-templates.

Read more comments on GitHub >

github_iconTop 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 >

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