Skip to content

Markdown linter: Fix three annoying/buggy rules#8

Merged
adrienverge merged 3 commits into
masterfrom
dev/FT/markdown-remove-MD024
Nov 2, 2015
Merged

Markdown linter: Fix three annoying/buggy rules#8
adrienverge merged 3 commits into
masterfrom
dev/FT/markdown-remove-MD024

Conversation

@adrienverge
Copy link
Copy Markdown
Contributor

Remove rule MD024 from linter checks. This means that having multiple
markdown headers with the same title will not be a problem anymore.
This was annoying for documents like this (example taken from
IronMan-Vault):

# Vault API

## Data Structures

### Account

### User

### Role

## Database

### Account

### User

### Role

Drawback: anchors generated by GitHub (to allow creating URLs pointing
directly to a paragraph) will collide for headers with the same label.

Remove rule MD024 from linter checks. This means that having multiple
markdown headers with the same title will not be a problem anymore.
This was annoying for documents like this (example taken from
IronMan-Vault):

```md
# Vault API

## Data Structures

### Account

### User

### Role

## Database

### Account

### User

### Role
```

Drawback: anchors generated by GitHub (to allow creating URLs pointing
directly to a paragraph) will collide for headers with the same label.
@ghost
Copy link
Copy Markdown

ghost commented Oct 30, 2015

LGTM. 👍 Though there's still the option of creating the anchors manually.

The default behavior when rule MD029 isn't given arguments is pretty
weird: it only accepts list with `1.` prefixes, e.g.:

    1. Do this.
    1. Do that.
    1. Done.

This patch changes the style to "ordered" so valid lists look like:

    1. Do this.
    2. Do that.
    3. Done.
Rule MD007 (unordered list indentation) is very restrictive and
sometimes annoying. For instance, it detects such lists as invalid
because of the nested one indentation:

    1. First, look at this list
       * nested item 1
       * nested item 2
    2. Then, another ordered item

This patch disables this rule.
@adrienverge adrienverge changed the title Markdown linter: Allow multiple headers with same content Markdown linter: Fix three annoying/buggy rules Oct 30, 2015
@adrienverge
Copy link
Copy Markdown
Contributor Author

I added two commits to the pull request, these are corrections for problems I detected when trying to lint markdown in the S3 project. Feel free to comment.

@ghost
Copy link
Copy Markdown

ghost commented Oct 30, 2015

Still LGTM. 👍

@ghost
Copy link
Copy Markdown

ghost commented Nov 2, 2015

Okay for me, thanks for adding the explanatory comments, since the rules are not exactly clear about what they cover.

@adrienverge
Copy link
Copy Markdown
Contributor Author

Thanks @DavidPineauScality and @MichaelZapataScality!

adrienverge added a commit that referenced this pull request Nov 2, 2015
Markdown linter: Fix three annoying/buggy rules
@adrienverge adrienverge merged commit 262d975 into master Nov 2, 2015
@adrienverge adrienverge deleted the dev/FT/markdown-remove-MD024 branch November 2, 2015 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant