mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Fix handling of mis-identified setext header.
This commit is contained in:
parent
26ab9a5596
commit
f91e3dafb6
2 changed files with 8 additions and 1 deletions
|
|
@ -428,7 +428,7 @@ module.exports = [
|
||||||
} else if (token.type === "inline") {
|
} else if (token.type === "inline") {
|
||||||
token.content.split(shared.newLineRe)
|
token.content.split(shared.newLineRe)
|
||||||
.forEach(function forLine(line, offset) {
|
.forEach(function forLine(line, offset) {
|
||||||
if (/^(-+|=+)\s*$/.test(line)) {
|
if (token.map && /^(-+|=+)\s*$/.test(line)) {
|
||||||
var seTextLineNumber = token.map[0] + offset;
|
var seTextLineNumber = token.map[0] + offset;
|
||||||
if (seTextLineNumber > 0) {
|
if (seTextLineNumber > 0) {
|
||||||
errors.push(seTextLineNumber);
|
errors.push(seTextLineNumber);
|
||||||
|
|
|
||||||
7
test/simple-table.md
Normal file
7
test/simple-table.md
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
# Header
|
||||||
|
|
||||||
|
| Head |
|
||||||
|
| ---- |
|
||||||
|
| Cell |
|
||||||
|
| ==== |
|
||||||
|
| Foot |
|
||||||
Loading…
Add table
Add a link
Reference in a new issue