html-validate-markdown
TypeScript icon, indicating that this package has built-in type declarations

4.0.0 • Public • Published

html-validate-markdown

Transform Html blocks in Markdown files for use with html-validate.

Build npm

<div>
    This is a html block. View Source to see me. Remember to always add ```html
    before your code in order to transform it.
</div>

Usage

npm install --save-dev html-validate-markdown

In .htmlvalidate.json:

{
    "transform": {
        "^.*\\.md$": "html-validate-markdown"
    }
}

If you wish to ignore a code fence from validation use the novalidate tag:

```html novalidate
<p>This will not be validated</i>
```

Configuration

By default only html code fences are validated but additional languages can be added by chaining additional transformers:

In .htmlvalidate.json:

{
  "transform": {
    "^.*\\.md$": "html-validate-markdown"
    "^.*\\.md:vue$": "html-validate-vue:sfc"
  }
}

In this case any code fence with the language vue will be transformed with html-validate-vue before validation.

If needed, html can be configured the same way using a regex similar to ^.*\\.md:html.

Development

$ npm install
$ npm run build
$ npm test

Copied from https://gitlab.com/html-validate/html-validate-vue

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 4.0.0
    82
    • latest

Version History

Package Sidebar

Install

npm i html-validate-markdown

Weekly Downloads

122

Version

4.0.0

License

MIT

Unpacked Size

6.06 kB

Total Files

7

Last publish

Collaborators

  • oloff