mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 22:40:13 +01:00
Support 1-3 spaces prefixing a code fence per specification (fixes #107).
This commit is contained in:
parent
40ace5bb5e
commit
89e12b90e0
3 changed files with 46 additions and 1 deletions
|
|
@ -141,7 +141,7 @@ function makeTokenCache(params) {
|
|||
// Find fenced code by pattern (parser ignores "``` close fence")
|
||||
params.lines.forEach(function forLine(line, lineIndex) {
|
||||
var metadata = 0;
|
||||
var match = /^(`{3,}|~{3,})/.exec(line);
|
||||
var match = /^[ ]{0,3}(`{3,}|~{3,})/.exec(line);
|
||||
var fence = match && match[1];
|
||||
if (fence &&
|
||||
(!inFence || (fence.substr(0, fenceStart.length) === fenceStart))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue