remark-lint-table-pipes
Advanced tools
Comparing version 2.0.1 to 3.0.0
21
index.js
@@ -20,3 +20,3 @@ /** | ||
* | ||
* @example {"name": "ok.md"} | ||
* @example {"name": "ok.md", "gfm": true} | ||
* | ||
@@ -27,3 +27,3 @@ * | A | B | | ||
* | ||
* @example {"name": "not-ok.md", "label": "input"} | ||
* @example {"name": "not-ok.md", "label": "input", "gfm": true} | ||
* | ||
@@ -34,3 +34,3 @@ * A | B | ||
* | ||
* @example {"name": "not-ok.md", "label": "output"} | ||
* @example {"name": "not-ok.md", "label": "output", "gfm": true} | ||
* | ||
@@ -68,7 +68,2 @@ * 1:1: Missing initial pipe in table fence | ||
var row | ||
var cells | ||
var head | ||
var tail | ||
var initial | ||
var final | ||
@@ -79,13 +74,7 @@ while (++index < length) { | ||
if (!generated(row)) { | ||
cells = row.children | ||
head = cells[0] | ||
tail = cells[cells.length - 1] | ||
initial = contents.slice(start(row).offset, start(head).offset) | ||
final = contents.slice(end(tail).offset, end(row).offset) | ||
if (initial.indexOf('|') === -1) { | ||
if (contents.charCodeAt(start(row).offset) !== 124) { | ||
file.message(reasonStart, start(row)) | ||
} | ||
if (final.indexOf('|') === -1) { | ||
if (contents.charCodeAt(end(row).offset - 1) !== 124) { | ||
file.message(reasonEnd, end(row)) | ||
@@ -92,0 +81,0 @@ } |
{ | ||
"name": "remark-lint-table-pipes", | ||
"version": "2.0.1", | ||
"version": "3.0.0", | ||
"description": "remark-lint rule to warn when table rows are not fenced with pipes", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -40,2 +40,4 @@ <!--This file is generated--> | ||
Note: this example uses [GFM][]. | ||
```markdown | ||
@@ -55,2 +57,4 @@ | A | B | | ||
Note: this example uses [GFM][]. | ||
```markdown | ||
@@ -152,5 +156,5 @@ A | B | ||
[chat-badge]: https://img.shields.io/badge/chat-spectrum.svg | ||
[chat-badge]: https://img.shields.io/badge/chat-discussions-success.svg | ||
[chat]: https://spectrum.chat/unified/remark | ||
[chat]: https://github.com/remarkjs/remark/discussions | ||
@@ -170,1 +174,3 @@ [npm]: https://docs.npmjs.com/cli/install | ||
[author]: https://wooorm.com | ||
[gfm]: https://github.com/remarkjs/remark-gfm |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
173
6997
69