Skip to content

Linting inside Markdown blocks outside of .md files #25

@lleger

Description

@lleger

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!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions