markdownlint: MD047/single-trailing-newline bug?
Reproduction steps:
git clone git@github.com:v8/v8.dev.git && cd v8.devnpm install(note: this includesmarkdownlint-cli@0.15.0)npm install markdownlint-cli@0.16.0markdownlint src/**/*.mdfails with the following error message:
src/blog/scanner.md: 95: MD047/single-trailing-newline Files should end with a single newline character
But, the last character in the file is definitely a U+000A LF character, as evidenced by hexdump:
$ hexdump -C src/blog/scanner.md | tail
00003900 73 73 69 62 6c 65 2e 20 49 64 65 61 6c 6c 79 2c |ssible. Ideally,|
00003910 20 74 68 65 73 65 20 73 74 65 70 73 20 61 72 65 | these steps are|
00003920 20 61 75 74 6f 6d 61 74 65 64 20 61 73 20 70 61 | automated as pa|
00003930 72 74 20 6f 66 20 61 20 62 75 69 6c 64 20 70 72 |rt of a build pr|
00003940 6f 63 65 73 73 2c 20 69 6e 20 77 68 69 63 68 20 |ocess, in which |
00003950 63 61 73 65 20 79 6f 75 20 64 6f 6e e2 80 99 74 |case you don...t|
00003960 20 68 61 76 65 20 74 6f 20 77 6f 72 72 79 20 61 | have to worry a|
00003970 62 6f 75 74 20 69 74 20 77 68 65 6e 20 61 75 74 |bout it when aut|
00003980 68 6f 72 69 6e 67 20 63 6f 64 65 2e 0a |horing code..|
0000398d
Ref. https://github.com/DavidAnson/markdownlint/pull/176 https://github.com/igorshubovych/markdownlint-cli/issues/56
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 15 (11 by maintainers)
Commits related to this issue
- Handle un-closed HTML comments in a way that does not trigger MD047/single-trailing-newline (fixes #187). — committed to DavidAnson/markdownlint by DavidAnson 5 years ago
- Update dependencies https://github.com/DavidAnson/markdownlint/issues/187 is now fixed! — committed to v8/v8.dev by mathiasbynens 5 years ago
@mathiasbynens: Version
0.14.2ofmarkdownlintis now available. If you reinstall the CLI, it should pick up the new reference.Slightly simpler: https://dlaa.me/markdownlint/#%25m%23 Heading `<!--`
I will debug later from a real computer. 😃
Thanks for helping track this down, both of you!!