GithubHelp home page GithubHelp logo

remarkjs / remark-normalize-headings Goto Github PK

View Code? Open in Web Editor NEW
11.0 8.0 1.0 91 KB

plugin to make sure there is a single top level heading in a document by adjusting heading ranks accordingly

Home Page: https://remark.js.org

License: MIT License

JavaScript 100.00%
remark remark-plugin mdast heading normalize

remark-normalize-headings's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

isabella232

remark-normalize-headings's Issues

extra space warning when used before remark-lint

I've been testing normalize-headings with lint.

This produces a warning about an extra space:

remark nh.md --use "normalize-headings" --use "lint"

This doesn't produce a warning about an extra space:

remark nh.md --use "lint" --use "normalize-headings"

I assume this is because normalize-headings is not finished when lint starts checking the markdown? I'm not sure what's causing this erroneous warning. The output looks correct.

I prefer to run normalize-headings along with other remark plugins that normalize and modify markdown before checking everything over with lint.

See attached example file.
nh.md.zip

Option to specify the top level heading

How hard would it be to provide an option to set the top level heading? I'm going to be using this for a blog, and since level 1 will be used for the post's title I'd like level 2 to be the highest used in the markdown. That way, even if someone used a level 1 it would get lowered to a level 2, and so on.

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.