DavidAnson / DavidAnson/markdownlint

Rule for unclosed unclosed code blocks using non-indented style

Open
#331 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

new rule
Dominant language
JavaScript
Stars
6.4k
Forks
947
Avg merge
2h 47m
Merged PRs (30d)
35

Description

When code fences are using backticks or other explicit styles, I think Markdownlint should add a warning when the block isn't closed.
I believe this would fit in the existing MD046/MD048, maybe by counting the opening vs closing blocks, but I can see this might not be straightforward to implement

Saw this was being picked up by the MicrosoftDocs build tooling and thought it would be good here too.

Here are some PRs where this is being fixed in an existing document https://github.com/dotnet/docs/pull/20716

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing MD046 and MD048 rule implementations and their tests, then review the linked MicrosoftDocs pull requests for expected behavior. Done means the linter warns when an explicitly fenced code block is unclosed, with tests covering the opening and closing fence count.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.