GithubHelp home page GithubHelp logo

Comments (9)

DavidAnson avatar DavidAnson commented on July 1, 2024 20

Documentation: https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md029---ordered-list-item-prefix

MD029 has two modes: one and ordered. The default mode is one which looks for the following style:

1. First
1. Second
1. Third

The benefit of this style is that lines can be reordered without having to worry about the numbers going out of sequence. If you wish to change the style to ordered per your example above, you can update the rule configuration via one of the supported mechanisms:

from markdownlint.

s10wen avatar s10wen commented on July 1, 2024 2

Landed here as this caught me out as well, updating to ordered it is then, thanks.

from markdownlint.

s10wen avatar s10wen commented on July 1, 2024

I'm new to VS, I've gone to settings and added the markdown code, but having trouble with the syntax, tried a few things but no luck, does anyone have an example for the settings code I should be using here please?

e.g.

{
    "workbench.colorTheme": "Monokai",
    "workbench.iconTheme": "vscode-icons",
    "editor.renderWhitespace": "all",
    "[markdown]": {
      "editor.wordWrap": "on",
      "editor.quickSuggestions": false,
      "editor.ol-prefix": "ordered"
    }
  }

from markdownlint.

DavidAnson avatar DavidAnson commented on July 1, 2024

On a phone right now, but if you edit VS Code config files from within the app, it will provide auto-complete suggestions to help. You should end up with something like what you see towards the bottom of this section:
https://github.com/DavidAnson/vscode-markdownlint/blob/master/README.md#configure

from markdownlint.

s10wen avatar s10wen commented on July 1, 2024

Thanks, managed to sort this, in case anyone else comes here, I'd clicked the top one here, instead of the bottom example code:

screen shot 2017-09-27 at 08 11 01

I now have:

{
    "workbench.colorTheme": "Monokai",
    "workbench.iconTheme": "vscode-icons",
    "editor.renderWhitespace": "all",
    "markdownlint.config": {
      "MD029": false,
      "MD034": false
    }
  }

from markdownlint.

amoghskulkarni avatar amoghskulkarni commented on July 1, 2024

I created .markdownlint.json in my root folder and added following snippet in that -

{
    "default": true,
    "ol-prefix": { "style": "ordered" }
}

But the linting still occurs at 2. showing green squiggly line, saying MD029/ol-prefix: Ordered list item prefix [Expected: 1; Actual: 2].

Am I missing something?

from markdownlint.

DavidAnson avatar DavidAnson commented on July 1, 2024

Can you show the Markdown you are getting the wrong result for?

from markdownlint.

DavidAnson avatar DavidAnson commented on July 1, 2024

And say what tool or code you are using to lint.

from markdownlint.

0xCourtney avatar 0xCourtney commented on July 1, 2024

In case you're confused about how to use ordered lists with this rule in place...

It’s important to note that the actual numbers you use to mark the list have no effect on the HTML output Markdown produces.

Original Markdown Spec

from markdownlint.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.