@paperist/remark-caption
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -160,16 +160,22 @@ /* | ||
}, | ||
peg$c6 = /^[^:\n]/, | ||
peg$c7 = peg$classExpectation([":", "\n"], true, false), | ||
peg$c8 = ":", | ||
peg$c9 = peg$literalExpectation(":", false), | ||
peg$c10 = "\\", | ||
peg$c11 = peg$literalExpectation("\\", false), | ||
peg$c12 = /^[^\n]/, | ||
peg$c13 = peg$classExpectation(["\n"], true, false), | ||
peg$c14 = function(c) { return c.join(''); }, | ||
peg$c15 = peg$otherExpectation("whitespace"), | ||
peg$c16 = " ", | ||
peg$c17 = peg$literalExpectation(" ", false), | ||
peg$c18 = "\t", | ||
peg$c19 = peg$literalExpectation("\t", false), | ||
peg$c6 = "Table", | ||
peg$c7 = peg$literalExpectation("Table", false), | ||
peg$c8 = "table", | ||
peg$c9 = peg$literalExpectation("table", false), | ||
peg$c10 = "Code", | ||
peg$c11 = peg$literalExpectation("Code", false), | ||
peg$c12 = "code", | ||
peg$c13 = peg$literalExpectation("code", false), | ||
peg$c14 = ":", | ||
peg$c15 = peg$literalExpectation(":", false), | ||
peg$c16 = "\\", | ||
peg$c17 = peg$literalExpectation("\\", false), | ||
peg$c18 = /^[^\n]/, | ||
peg$c19 = peg$classExpectation(["\n"], true, false), | ||
peg$c20 = function(c) { return c.join(''); }, | ||
peg$c21 = peg$otherExpectation("whitespace"), | ||
peg$c22 = " ", | ||
peg$c23 = peg$literalExpectation(" ", false), | ||
peg$c24 = "\t", | ||
peg$c25 = peg$literalExpectation("\t", false), | ||
@@ -438,20 +444,39 @@ peg$currPos = 0, | ||
s0 = peg$currPos; | ||
s1 = []; | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
if (input.substr(peg$currPos, 5) === peg$c6) { | ||
s1 = peg$c6; | ||
peg$currPos += 5; | ||
} else { | ||
s2 = peg$FAILED; | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c7); } | ||
} | ||
while (s2 !== peg$FAILED) { | ||
s1.push(s2); | ||
if (peg$c6.test(input.charAt(peg$currPos))) { | ||
s2 = input.charAt(peg$currPos); | ||
peg$currPos++; | ||
if (s1 === peg$FAILED) { | ||
if (input.substr(peg$currPos, 5) === peg$c8) { | ||
s1 = peg$c8; | ||
peg$currPos += 5; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c7); } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c9); } | ||
} | ||
if (s1 === peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c10) { | ||
s1 = peg$c10; | ||
peg$currPos += 4; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c11); } | ||
} | ||
if (s1 === peg$FAILED) { | ||
if (input.substr(peg$currPos, 4) === peg$c12) { | ||
s1 = peg$c12; | ||
peg$currPos += 4; | ||
} else { | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
} | ||
} | ||
} | ||
} | ||
if (s1 === peg$FAILED) { | ||
s1 = null; | ||
} | ||
if (s1 !== peg$FAILED) { | ||
@@ -466,7 +491,7 @@ s2 = []; | ||
if (input.charCodeAt(peg$currPos) === 58) { | ||
s3 = peg$c8; | ||
s3 = peg$c14; | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c9); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
} | ||
@@ -498,10 +523,10 @@ if (s3 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s2 = peg$c10; | ||
s2 = peg$c16; | ||
peg$currPos++; | ||
} else { | ||
s2 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c11); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
} | ||
if (s2 !== peg$FAILED) { | ||
if (peg$c12.test(input.charAt(peg$currPos))) { | ||
if (peg$c18.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
@@ -511,3 +536,3 @@ peg$currPos++; | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
@@ -530,7 +555,7 @@ if (s3 !== peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 92) { | ||
s3 = peg$c10; | ||
s3 = peg$c16; | ||
peg$currPos++; | ||
} else { | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c11); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
} | ||
@@ -545,3 +570,3 @@ peg$silentFails--; | ||
if (s2 !== peg$FAILED) { | ||
if (peg$c12.test(input.charAt(peg$currPos))) { | ||
if (peg$c18.test(input.charAt(peg$currPos))) { | ||
s3 = input.charAt(peg$currPos); | ||
@@ -551,3 +576,3 @@ peg$currPos++; | ||
s3 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c13); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
} | ||
@@ -568,3 +593,3 @@ if (s3 !== peg$FAILED) { | ||
peg$savedPos = s0; | ||
s1 = peg$c14(s1); | ||
s1 = peg$c20(s1); | ||
} | ||
@@ -581,15 +606,15 @@ s0 = s1; | ||
if (input.charCodeAt(peg$currPos) === 32) { | ||
s0 = peg$c16; | ||
s0 = peg$c22; | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c17); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c23); } | ||
} | ||
if (s0 === peg$FAILED) { | ||
if (input.charCodeAt(peg$currPos) === 9) { | ||
s0 = peg$c18; | ||
s0 = peg$c24; | ||
peg$currPos++; | ||
} else { | ||
s0 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c19); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c25); } | ||
} | ||
@@ -600,3 +625,3 @@ } | ||
s1 = peg$FAILED; | ||
if (peg$silentFails === 0) { peg$fail(peg$c15); } | ||
if (peg$silentFails === 0) { peg$fail(peg$c21); } | ||
} | ||
@@ -603,0 +628,0 @@ |
@@ -11,3 +11,3 @@ { | ||
}, | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"main": "lib/index.js", | ||
@@ -14,0 +14,0 @@ "files": [ |
@@ -55,2 +55,9 @@ # @paperist/remark-caption | ||
Table: Demonstration of pipe table syntax. | ||
~~~rb | ||
puts "Hello World!"; | ||
~~~ | ||
Code: Hello World written by Ruby. | ||
`; | ||
@@ -77,3 +84,3 @@ | ||
`CaptionBlock` extends [`Parent`][unist-parnet]. | ||
`CaptionBlock` extends [`Parent`][unist-parent]. | ||
@@ -106,3 +113,3 @@ ```typescript | ||
[unist-caption]: https://github.com/syntax-tree/unist#caption | ||
[unist-parent]: https://github.com/syntax-tree/unist#parent | ||
@@ -109,0 +116,0 @@ ## Contribute |
23017
629
120