diff --git a/Dockerfile.test b/Dockerfile.test
index 9ba8602..5bbf0dd 100644
--- a/Dockerfile.test
+++ b/Dockerfile.test
@@ -33,7 +33,7 @@ RUN bash install.sh
ENV PATH=/root/.local/bin:${PATH}
RUN akku update
WORKDIR /workdir
+RUN snow-chibi --impls=${SCHEME} --always-yes install "(srfi 64)"
RUN snow-chibi --impls=${SCHEME} --always-yes install "(srfi 180)"
COPY Makefile .
COPY retropikzel retropikzel/
-
diff --git a/Makefile b/Makefile
index d44a80b..12913f3 100644
--- a/Makefile
+++ b/Makefile
@@ -44,26 +44,26 @@ ${TMPDIR}:
if [ -d srfi ]; then cp -r srfi ${TMPDIR}/; fi
test-r6rs: ${TMPDIR}
- cd ${TMPDIR} && printf "#!r6rs\n(import (rnrs base) (rnrs control) (rnrs io simple) (rnrs files) (rnrs programs) (srfi :64) (retropikzel ${LIBRARY}))\n" > test-r6rs.sps
+ cd ${TMPDIR} && printf "#!r6rs\n(import (rnrs base) (rnrs control) (rnrs io simple) (rnrs files) (rnrs programs) (srfi :64) (srfi :180) (retropikzel ${LIBRARY}))\n" > test-r6rs.sps
cat ${TESTFILE} >> ${TMPDIR}/test-r6rs.sps
cd ${TMPDIR} && akku install chez-srfi akku-r7rs
cd ${TMPDIR} && COMPILE_R7RS=${SCHEME} timeout 120 compile-scheme -I .akku/lib -o test-r6rs test-r6rs.sps
- cd ${TMPDIR} && timeout 60 ./test-r6rs
+ cd ${TMPDIR} && timeout 120 ./test-r6rs
test-r6rs-docker: ${TMPDIR}
echo "Building docker image..."
- docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=${DOCKER_TAG} -f Dockerfile.test ${DOCKER_QUIET} . > /dev/null
+ docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=${DOCKER_TAG} -f Dockerfile.test ${DOCKER_QUIET} .
docker run -t ${DOCKER_TAG} sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} test-r6rs"
test-r7rs: ${TMPDIR}
- cd ${TMPDIR} && echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (srfi 64) (retropikzel ${LIBRARY}))" > test-r7rs.scm
+ cd ${TMPDIR} && echo "(import (scheme base) (scheme write) (scheme read) (scheme char) (scheme file) (scheme process-context) (srfi 64) (srfi 180) (retropikzel ${LIBRARY}))" > test-r7rs.scm
cat ${TESTFILE} >> ${TMPDIR}/test-r7rs.scm
- cd ${TMPDIR} && COMPILE_R7RS=${SCHEME} timeout 120 compile-scheme -o test-r7rs test-r7rs.scm
- cd ${TMPDIR} && timeout 60 ./test-r7rs
+ cd ${TMPDIR} && COMPILE_R7RS=${SCHEME} timeout 120 compile-scheme -I . -o test-r7rs test-r7rs.scm
+ cd ${TMPDIR} && timeout 120 ./test-r7rs
test-r7rs-docker: ${TMPDIR}
echo "Building docker image..."
- docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=${DOCKER_TAG} -f Dockerfile.test ${DOCKER_QUIET} . > /dev/null
+ docker build --build-arg IMAGE=${DOCKERIMG} --build-arg SCHEME=${SCHEME} --tag=${DOCKER_TAG} -f Dockerfile.test ${DOCKER_QUIET} .
docker run -t ${DOCKER_TAG} sh -c "make SCHEME=${SCHEME} SNOW_CHIBI_ARGS=--always-yes LIBRARY=${LIBRARY} build install test-r7rs"
clean:
diff --git a/retropikzel/commonmark.scm b/retropikzel/commonmark.scm
new file mode 100644
index 0000000..9da7694
--- /dev/null
+++ b/retropikzel/commonmark.scm
@@ -0,0 +1,17 @@
+(define (starts-with? haystack needle)
+ (let ((needle-length (string-length needle)))
+ (and (>= (string-length haystack) needle-length)
+ (string=? (string-copy haystack 0 needle-length) needle))))
+
+(define (internal-loop port result)
+ ;; TODO Peak-char and then if it's # for example call read-header
+ ;; if it is [ call read-link. The reader functions then either read from port
+ ;; if it is a header or link, or do nothing
+ #t
+ )
+
+(define (commonmark->sxml port)
+ (internal-loop port ""))
+
+(define (commonmark->html port)
+ "")
diff --git a/retropikzel/commonmark.sld b/retropikzel/commonmark.sld
new file mode 100644
index 0000000..de47491
--- /dev/null
+++ b/retropikzel/commonmark.sld
@@ -0,0 +1,12 @@
+(define-library
+ (retropikzel commonmark)
+ (import (scheme base))
+ (export commonmark->sxml
+ ;commonmark-file->sxml
+ ;commonmark->xml
+ ;commonmark-file->xml
+ commonmark->html
+ ;commonmark-file->html
+ )
+ (include "commonmark.scm"))
+
diff --git a/retropikzel/commonmark/LICENSE b/retropikzel/commonmark/LICENSE
new file mode 100644
index 0000000..0a04128
--- /dev/null
+++ b/retropikzel/commonmark/LICENSE
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
foo\tbaz\t\tbim\n\n",
+ "example": 1,
+ "start_line": 355,
+ "end_line": 360,
+ "section": "Tabs"
+ },
+ {
+ "markdown": " \tfoo\tbaz\t\tbim\n",
+ "html": "foo\tbaz\t\tbim\n\n",
+ "example": 2,
+ "start_line": 362,
+ "end_line": 367,
+ "section": "Tabs"
+ },
+ {
+ "markdown": " a\ta\n ὐ\ta\n",
+ "html": "a\ta\nὐ\ta\n\n",
+ "example": 3,
+ "start_line": 369,
+ "end_line": 376,
+ "section": "Tabs"
+ },
+ {
+ "markdown": " - foo\n\n\tbar\n",
+ "html": "foo
\nbar
\nfoo
\n bar\n\n\n\n", + "example": 6, + "start_line": 418, + "end_line": 425, + "section": "Tabs" + }, + { + "markdown": "-\t\tfoo\n", + "html": "\nfoo\n
foo\n\nfoo\nbar\n\n",
+ "example": 8,
+ "start_line": 439,
+ "end_line": 446,
+ "section": "Tabs"
+ },
+ {
+ "markdown": " - foo\n - bar\n\t - baz\n",
+ "html": "!"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~
\n", + "example": 12, + "start_line": 489, + "end_line": 493, + "section": "Backslash escapes" + }, + { + "markdown": "\\\t\\A\\a\\ \\3\\φ\\«\n", + "html": "\\\t\\A\\a\\ \\3\\φ\\«
\n", + "example": 13, + "start_line": 499, + "end_line": 503, + "section": "Backslash escapes" + }, + { + "markdown": "\\*not emphasized*\n\\*not emphasized*\n<br/> not a tag\n[not a link](/foo)\n`not code`\n1. not a list\n* not a list\n# not a heading\n[foo]: /url "not a reference"\nö not a character entity
\n", + "example": 14, + "start_line": 509, + "end_line": 529, + "section": "Backslash escapes" + }, + { + "markdown": "\\\\*emphasis*\n", + "html": "\\emphasis
\n", + "example": 15, + "start_line": 534, + "end_line": 538, + "section": "Backslash escapes" + }, + { + "markdown": "foo\\\nbar\n", + "html": "foo
\nbar
\\[\\`
\\[\\]\n\n",
+ "example": 18,
+ "start_line": 562,
+ "end_line": 567,
+ "section": "Backslash escapes"
+ },
+ {
+ "markdown": "~~~\n\\[\\]\n~~~\n",
+ "html": "\\[\\]\n\n",
+ "example": 19,
+ "start_line": 570,
+ "end_line": 577,
+ "section": "Backslash escapes"
+ },
+ {
+ "markdown": "foo\n\n",
+ "example": 24,
+ "start_line": 613,
+ "end_line": 620,
+ "section": "Backslash escapes"
+ },
+ {
+ "markdown": " & © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸\n",
+ "html": "& © Æ Ď\n¾ ℋ ⅆ\n∲ ≧̸
\n", + "example": 25, + "start_line": 649, + "end_line": 657, + "section": "Entity and numeric character references" + }, + { + "markdown": "# Ӓ Ϡ \n", + "html": "# Ӓ Ϡ �
\n", + "example": 26, + "start_line": 668, + "end_line": 672, + "section": "Entity and numeric character references" + }, + { + "markdown": "" ആ ಫ\n", + "html": "" ആ ಫ
\n", + "example": 27, + "start_line": 681, + "end_line": 685, + "section": "Entity and numeric character references" + }, + { + "markdown": "  &x; \n\nabcdef0;\n&ThisIsNotDefined; &hi?;\n", + "html": "  &x; &#; &#x;\n�\n&#abcdef0;\n&ThisIsNotDefined; &hi?;
\n", + "example": 28, + "start_line": 690, + "end_line": 700, + "section": "Entity and numeric character references" + }, + { + "markdown": "©\n", + "html": "©
\n", + "example": 29, + "start_line": 707, + "end_line": 711, + "section": "Entity and numeric character references" + }, + { + "markdown": "&MadeUpEntity;\n", + "html": "&MadeUpEntity;
\n", + "example": 30, + "start_line": 717, + "end_line": 721, + "section": "Entity and numeric character references" + }, + { + "markdown": "\n", + "html": "\n", + "example": 31, + "start_line": 728, + "end_line": 732, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo](/föö \"föö\")\n", + "html": "\n", + "example": 32, + "start_line": 735, + "end_line": 739, + "section": "Entity and numeric character references" + }, + { + "markdown": "[foo]\n\n[foo]: /föö \"föö\"\n", + "html": "\n", + "example": 33, + "start_line": 742, + "end_line": 748, + "section": "Entity and numeric character references" + }, + { + "markdown": "``` föö\nfoo\n```\n", + "html": "foo\n\n",
+ "example": 34,
+ "start_line": 751,
+ "end_line": 758,
+ "section": "Entity and numeric character references"
+ },
+ {
+ "markdown": "`föö`\n",
+ "html": "föö
föfö\n\n",
+ "example": 36,
+ "start_line": 771,
+ "end_line": 776,
+ "section": "Entity and numeric character references"
+ },
+ {
+ "markdown": "*foo*\n*foo*\n",
+ "html": "*foo*\nfoo
\n", + "example": 37, + "start_line": 783, + "end_line": 789, + "section": "Entity and numeric character references" + }, + { + "markdown": "* foo\n\n* foo\n", + "html": "* foo
\nfoo\n\nbar
\n", + "example": 39, + "start_line": 802, + "end_line": 808, + "section": "Entity and numeric character references" + }, + { + "markdown": " foo\n", + "html": "\tfoo
\n", + "example": 40, + "start_line": 810, + "end_line": 814, + "section": "Entity and numeric character references" + }, + { + "markdown": "[a](url "tit")\n", + "html": "[a](url "tit")
\n", + "example": 41, + "start_line": 817, + "end_line": 821, + "section": "Entity and numeric character references" + }, + { + "markdown": "- `one\n- two`\n", + "html": "+++
\n", + "example": 44, + "start_line": 892, + "end_line": 896, + "section": "Thematic breaks" + }, + { + "markdown": "===\n", + "html": "===
\n", + "example": 45, + "start_line": 899, + "end_line": 903, + "section": "Thematic breaks" + }, + { + "markdown": "--\n**\n__\n", + "html": "--\n**\n__
\n", + "example": 46, + "start_line": 908, + "end_line": 916, + "section": "Thematic breaks" + }, + { + "markdown": " ***\n ***\n ***\n", + "html": "***\n\n",
+ "example": 48,
+ "start_line": 934,
+ "end_line": 939,
+ "section": "Thematic breaks"
+ },
+ {
+ "markdown": "Foo\n ***\n",
+ "html": "Foo\n***
\n", + "example": 49, + "start_line": 942, + "end_line": 948, + "section": "Thematic breaks" + }, + { + "markdown": "_____________________________________\n", + "html": "_ _ _ _ a
\na------
\n---a---
\n", + "example": 55, + "start_line": 994, + "end_line": 1004, + "section": "Thematic breaks" + }, + { + "markdown": " *-*\n", + "html": "-
\n", + "example": 56, + "start_line": 1010, + "end_line": 1014, + "section": "Thematic breaks" + }, + { + "markdown": "- foo\n***\n- bar\n", + "html": "Foo
\nbar
\n", + "example": 58, + "start_line": 1036, + "end_line": 1044, + "section": "Thematic breaks" + }, + { + "markdown": "Foo\n---\nbar\n", + "html": "bar
\n", + "example": 59, + "start_line": 1053, + "end_line": 1060, + "section": "Thematic breaks" + }, + { + "markdown": "* Foo\n* * *\n* Bar\n", + "html": "####### foo
\n", + "example": 63, + "start_line": 1131, + "end_line": 1135, + "section": "ATX headings" + }, + { + "markdown": "#5 bolt\n\n#hashtag\n", + "html": "#5 bolt
\n#hashtag
\n", + "example": 64, + "start_line": 1146, + "end_line": 1153, + "section": "ATX headings" + }, + { + "markdown": "\\## foo\n", + "html": "## foo
\n", + "example": 65, + "start_line": 1158, + "end_line": 1162, + "section": "ATX headings" + }, + { + "markdown": "# foo *bar* \\*baz\\*\n", + "html": "# foo\n\n",
+ "example": 69,
+ "start_line": 1198,
+ "end_line": 1203,
+ "section": "ATX headings"
+ },
+ {
+ "markdown": "foo\n # bar\n",
+ "html": "foo\n# bar
\n", + "example": 70, + "start_line": 1206, + "end_line": 1212, + "section": "ATX headings" + }, + { + "markdown": "## foo ##\n ### bar ###\n", + "html": "Foo bar
\nBar foo
\n", + "example": 78, + "start_line": 1294, + "end_line": 1302, + "section": "ATX headings" + }, + { + "markdown": "## \n#\n### ###\n", + "html": "\n\n\n", + "example": 79, + "start_line": 1307, + "end_line": 1315, + "section": "ATX headings" + }, + { + "markdown": "Foo *bar*\n=========\n\nFoo *bar*\n---------\n", + "html": "Foo\n---\n\nFoo\n\nFoo\n---
\n", + "example": 87, + "start_line": 1449, + "end_line": 1455, + "section": "Setext headings" + }, + { + "markdown": "Foo\n= =\n\nFoo\n--- -\n", + "html": "Foo\n= =
\nFoo
\n`
\nof dashes"/>
\n", + "example": 91, + "start_line": 1497, + "end_line": 1510, + "section": "Setext headings" + }, + { + "markdown": "> Foo\n---\n", + "html": "\n\nFoo
\n
\n\n", + "example": 93, + "start_line": 1527, + "end_line": 1537, + "section": "Setext headings" + }, + { + "markdown": "- Foo\n---\n", + "html": "foo\nbar\n===
\n
Baz
\n", + "example": 96, + "start_line": 1568, + "end_line": 1580, + "section": "Setext headings" + }, + { + "markdown": "\n====\n", + "html": "====
\n", + "example": 97, + "start_line": 1585, + "end_line": 1590, + "section": "Setext headings" + }, + { + "markdown": "---\n---\n", + "html": "foo\n\n\n\nfoo
\n
Foo
\nbaz
\n", + "example": 103, + "start_line": 1672, + "end_line": 1682, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\n---\n\nbaz\n", + "html": "Foo\nbar
\nbaz
\n", + "example": 104, + "start_line": 1688, + "end_line": 1700, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n* * *\nbaz\n", + "html": "Foo\nbar
\nbaz
\n", + "example": 105, + "start_line": 1706, + "end_line": 1716, + "section": "Setext headings" + }, + { + "markdown": "Foo\nbar\n\\---\nbaz\n", + "html": "Foo\nbar\n---\nbaz
\n", + "example": 106, + "start_line": 1721, + "end_line": 1731, + "section": "Setext headings" + }, + { + "markdown": " a simple\n indented code block\n", + "html": "a simple\n indented code block\n\n",
+ "example": 107,
+ "start_line": 1749,
+ "end_line": 1756,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": " - foo\n\n bar\n",
+ "html": "foo
\nbar
\nfoo
\n<a/>\n*hi*\n\n- one\n\n",
+ "example": 110,
+ "start_line": 1797,
+ "end_line": 1808,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": " chunk1\n\n chunk2\n \n \n \n chunk3\n",
+ "html": "chunk1\n\nchunk2\n\n\n\nchunk3\n\n",
+ "example": 111,
+ "start_line": 1813,
+ "end_line": 1830,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": " chunk1\n \n chunk2\n",
+ "html": "chunk1\n \n chunk2\n\n",
+ "example": 112,
+ "start_line": 1836,
+ "end_line": 1845,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": "Foo\n bar\n\n",
+ "html": "Foo\nbar
\n", + "example": 113, + "start_line": 1851, + "end_line": 1858, + "section": "Indented code blocks" + }, + { + "markdown": " foo\nbar\n", + "html": "foo\n\nbar
\n", + "example": 114, + "start_line": 1865, + "end_line": 1872, + "section": "Indented code blocks" + }, + { + "markdown": "# Heading\n foo\nHeading\n------\n foo\n----\n", + "html": "foo\n\nfoo\n\n foo\nbar\n\n",
+ "example": 116,
+ "start_line": 1898,
+ "end_line": 1905,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": "\n \n foo\n \n\n",
+ "html": "foo\n\n",
+ "example": 117,
+ "start_line": 1911,
+ "end_line": 1920,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": " foo \n",
+ "html": "foo \n\n",
+ "example": 118,
+ "start_line": 1925,
+ "end_line": 1930,
+ "section": "Indented code blocks"
+ },
+ {
+ "markdown": "```\n<\n >\n```\n",
+ "html": "<\n >\n\n",
+ "example": 119,
+ "start_line": 1980,
+ "end_line": 1989,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "~~~\n<\n >\n~~~\n",
+ "html": "<\n >\n\n",
+ "example": 120,
+ "start_line": 1994,
+ "end_line": 2003,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "``\nfoo\n``\n",
+ "html": "foo
aaa\n~~~\n\n",
+ "example": 122,
+ "start_line": 2018,
+ "end_line": 2027,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "~~~\naaa\n```\n~~~\n",
+ "html": "aaa\n```\n\n",
+ "example": 123,
+ "start_line": 2030,
+ "end_line": 2039,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "````\naaa\n```\n``````\n",
+ "html": "aaa\n```\n\n",
+ "example": 124,
+ "start_line": 2044,
+ "end_line": 2053,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "~~~~\naaa\n~~~\n~~~~\n",
+ "html": "aaa\n~~~\n\n",
+ "example": 125,
+ "start_line": 2056,
+ "end_line": 2065,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "```\n",
+ "html": "\n",
+ "example": 126,
+ "start_line": 2071,
+ "end_line": 2075,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "`````\n\n```\naaa\n",
+ "html": "\n```\naaa\n\n",
+ "example": 127,
+ "start_line": 2078,
+ "end_line": 2088,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "> ```\n> aaa\n\nbbb\n",
+ "html": "\n\n\naaa\n
bbb
\n", + "example": 128, + "start_line": 2091, + "end_line": 2102, + "section": "Fenced code blocks" + }, + { + "markdown": "```\n\n \n```\n", + "html": "\n \n\n",
+ "example": 129,
+ "start_line": 2107,
+ "end_line": 2116,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "```\n```\n",
+ "html": "\n",
+ "example": 130,
+ "start_line": 2121,
+ "end_line": 2126,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": " ```\n aaa\naaa\n```\n",
+ "html": "aaa\naaa\n\n",
+ "example": 131,
+ "start_line": 2133,
+ "end_line": 2142,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": " ```\naaa\n aaa\naaa\n ```\n",
+ "html": "aaa\naaa\naaa\n\n",
+ "example": 132,
+ "start_line": 2145,
+ "end_line": 2156,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": " ```\n aaa\n aaa\n aaa\n ```\n",
+ "html": "aaa\n aaa\naaa\n\n",
+ "example": 133,
+ "start_line": 2159,
+ "end_line": 2170,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": " ```\n aaa\n ```\n",
+ "html": "```\naaa\n```\n\n",
+ "example": 134,
+ "start_line": 2175,
+ "end_line": 2184,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "```\naaa\n ```\n",
+ "html": "aaa\n\n",
+ "example": 135,
+ "start_line": 2190,
+ "end_line": 2197,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": " ```\naaa\n ```\n",
+ "html": "aaa\n\n",
+ "example": 136,
+ "start_line": 2200,
+ "end_line": 2207,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "```\naaa\n ```\n",
+ "html": "aaa\n ```\n\n",
+ "example": 137,
+ "start_line": 2212,
+ "end_line": 2220,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "``` ```\naaa\n",
+ "html": " \naaa
aaa\n~~~ ~~\n\n",
+ "example": 139,
+ "start_line": 2235,
+ "end_line": 2243,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "foo\n```\nbar\n```\nbaz\n",
+ "html": "foo
\nbar\n\nbaz
\n", + "example": 140, + "start_line": 2249, + "end_line": 2260, + "section": "Fenced code blocks" + }, + { + "markdown": "foo\n---\n~~~\nbar\n~~~\n# baz\n", + "html": "bar\n\ndef foo(x)\n return 3\nend\n\n",
+ "example": 142,
+ "start_line": 2288,
+ "end_line": 2299,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "~~~~ ruby startline=3 $%@#$\ndef foo(x)\n return 3\nend\n~~~~~~~\n",
+ "html": "def foo(x)\n return 3\nend\n\n",
+ "example": 143,
+ "start_line": 2302,
+ "end_line": 2313,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "````;\n````\n",
+ "html": "\n",
+ "example": 144,
+ "start_line": 2316,
+ "end_line": 2321,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "``` aa ```\nfoo\n",
+ "html": "aa\nfoo
foo\n\n",
+ "example": 146,
+ "start_line": 2337,
+ "end_line": 2344,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "```\n``` aaa\n```\n",
+ "html": "``` aaa\n\n",
+ "example": 147,
+ "start_line": 2349,
+ "end_line": 2356,
+ "section": "Fenced code blocks"
+ },
+ {
+ "markdown": "\n\n**Hello**,\n\n_world_.\n\n |
\n\n**Hello**,\n\n |
| \n hi\n | \n
| \n hi\n | \n
okay.
\n", + "example": 149, + "start_line": 2458, + "end_line": 2477, + "section": "HTML blocks" + }, + { + "markdown": "Markdown
\nbar
\n", + "example": 155, + "start_line": 2543, + "end_line": 2552, + "section": "HTML blocks" + }, + { + "markdown": "\n", + "html": "\n", + "example": 159, + "start_line": 2592, + "end_line": 2596, + "section": "HTML blocks" + }, + { + "markdown": "| \nfoo\n |
| \nfoo\n |
foo
\nfoo
\nfoo\n
\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n\nokay\n",
+ "html": "\nimport Text.HTML.TagSoup\n\nmain :: IO ()\nmain = print $ parseTags tags\n\nokay
\n", + "example": 171, + "start_line": 2753, + "end_line": 2769, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\nokay
\n", + "example": 172, + "start_line": 2774, + "end_line": 2788, + "section": "HTML blocks" + }, + { + "markdown": "\n", + "html": "\n", + "example": 173, + "start_line": 2793, + "end_line": 2809, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\nokay
\n", + "example": 174, + "start_line": 2813, + "end_line": 2829, + "section": "HTML blocks" + }, + { + "markdown": "\n*foo*\n", + "html": "\nfoo
\n", + "example": 178, + "start_line": 2878, + "end_line": 2884, + "section": "HTML blocks" + }, + { + "markdown": "*bar*\n*baz*\n", + "html": "*bar*\nbaz
\n", + "example": 179, + "start_line": 2887, + "end_line": 2893, + "section": "HTML blocks" + }, + { + "markdown": "1. *bar*\n", + "html": "1. *bar*\n", + "example": 180, + "start_line": 2899, + "end_line": 2907, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\nokay
\n", + "example": 181, + "start_line": 2912, + "end_line": 2924, + "section": "HTML blocks" + }, + { + "markdown": "';\n\n?>\nokay\n", + "html": "';\n\n?>\nokay
\n", + "example": 182, + "start_line": 2930, + "end_line": 2944, + "section": "HTML blocks" + }, + { + "markdown": "\n", + "html": "\n", + "example": 183, + "start_line": 2949, + "end_line": 2953, + "section": "HTML blocks" + }, + { + "markdown": "\nokay\n", + "html": "\nokay
\n", + "example": 184, + "start_line": 2958, + "end_line": 2986, + "section": "HTML blocks" + }, + { + "markdown": " \n\n \n", + "html": " \n<!-- foo -->\n\n",
+ "example": 185,
+ "start_line": 2992,
+ "end_line": 3000,
+ "section": "HTML blocks"
+ },
+ {
+ "markdown": " <div>\n\n",
+ "example": 186,
+ "start_line": 3003,
+ "end_line": 3011,
+ "section": "HTML blocks"
+ },
+ {
+ "markdown": "Foo\nFoo
\nFoo\n\nbaz
\n", + "example": 189, + "start_line": 3049, + "end_line": 3057, + "section": "HTML blocks" + }, + { + "markdown": "Emphasized text.
\n| \nHi\n | \n\n
| \nHi\n | \n
| \n Hi\n | \n\n
[foo]: /url 'title
\nwith blank line'
\n[foo]
\n", + "example": 199, + "start_line": 3262, + "end_line": 3272, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n/url\n\n[foo]\n", + "html": "\n", + "example": 200, + "start_line": 3277, + "end_line": 3284, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:\n\n[foo]\n", + "html": "[foo]:
\n[foo]
\n", + "example": 201, + "start_line": 3289, + "end_line": 3296, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: <>\n\n[foo]\n", + "html": "\n", + "example": 202, + "start_line": 3301, + "end_line": 3307, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]:[foo]:
[foo]
\n", + "example": 203, + "start_line": 3312, + "end_line": 3319, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\\bar\\*baz \"foo\\\"bar\\baz\"\n\n[foo]\n", + "html": "\n", + "example": 204, + "start_line": 3325, + "end_line": 3331, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: url\n", + "html": "\n", + "example": 205, + "start_line": 3336, + "end_line": 3342, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n[foo]: first\n[foo]: second\n", + "html": "\n", + "example": 206, + "start_line": 3348, + "end_line": 3355, + "section": "Link reference definitions" + }, + { + "markdown": "[FOO]: /url\n\n[Foo]\n", + "html": "\n", + "example": 207, + "start_line": 3361, + "end_line": 3367, + "section": "Link reference definitions" + }, + { + "markdown": "[ΑΓΩ]: /φου\n\n[αγω]\n", + "html": "\n", + "example": 208, + "start_line": 3370, + "end_line": 3376, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n", + "html": "", + "example": 209, + "start_line": 3385, + "end_line": 3388, + "section": "Link reference definitions" + }, + { + "markdown": "[\nfoo\n]: /url\nbar\n", + "html": "bar
\n", + "example": 210, + "start_line": 3393, + "end_line": 3400, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url \"title\" ok\n", + "html": "[foo]: /url "title" ok
\n", + "example": 211, + "start_line": 3406, + "end_line": 3410, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\n\"title\" ok\n", + "html": ""title" ok
\n", + "example": 212, + "start_line": 3415, + "end_line": 3420, + "section": "Link reference definitions" + }, + { + "markdown": " [foo]: /url \"title\"\n\n[foo]\n", + "html": "[foo]: /url "title"\n\n[foo]
\n", + "example": 213, + "start_line": 3426, + "end_line": 3434, + "section": "Link reference definitions" + }, + { + "markdown": "```\n[foo]: /url\n```\n\n[foo]\n", + "html": "[foo]: /url\n\n[foo]
\n", + "example": 214, + "start_line": 3440, + "end_line": 3450, + "section": "Link reference definitions" + }, + { + "markdown": "Foo\n[bar]: /baz\n\n[bar]\n", + "html": "Foo\n[bar]: /baz
\n[bar]
\n", + "example": 215, + "start_line": 3455, + "end_line": 3464, + "section": "Link reference definitions" + }, + { + "markdown": "# [Foo]\n[foo]: /url\n> bar\n", + "html": "\n\n", + "example": 216, + "start_line": 3470, + "end_line": 3479, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /url\nbar\n===\n[foo]\n", + "html": "bar
\n
===\nfoo
\n", + "example": 218, + "start_line": 3491, + "end_line": 3498, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]: /foo-url \"foo\"\n[bar]: /bar-url\n \"bar\"\n[baz]: /baz-url\n\n[foo],\n[bar],\n[baz]\n", + "html": "\n", + "example": 219, + "start_line": 3504, + "end_line": 3517, + "section": "Link reference definitions" + }, + { + "markdown": "[foo]\n\n> [foo]: /url\n", + "html": "\n\n\n", + "example": 220, + "start_line": 3525, + "end_line": 3533, + "section": "Link reference definitions" + }, + { + "markdown": "aaa\n\nbbb\n", + "html": "
aaa
\nbbb
\n", + "example": 221, + "start_line": 3547, + "end_line": 3554, + "section": "Paragraphs" + }, + { + "markdown": "aaa\nbbb\n\nccc\nddd\n", + "html": "aaa\nbbb
\nccc\nddd
\n", + "example": 222, + "start_line": 3559, + "end_line": 3570, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n\n\nbbb\n", + "html": "aaa
\nbbb
\n", + "example": 223, + "start_line": 3575, + "end_line": 3583, + "section": "Paragraphs" + }, + { + "markdown": " aaa\n bbb\n", + "html": "aaa\nbbb
\n", + "example": 224, + "start_line": 3588, + "end_line": 3594, + "section": "Paragraphs" + }, + { + "markdown": "aaa\n bbb\n ccc\n", + "html": "aaa\nbbb\nccc
\n", + "example": 225, + "start_line": 3600, + "end_line": 3608, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "aaa\nbbb
\n", + "example": 226, + "start_line": 3614, + "end_line": 3620, + "section": "Paragraphs" + }, + { + "markdown": " aaa\nbbb\n", + "html": "aaa\n\nbbb
\n", + "example": 227, + "start_line": 3623, + "end_line": 3630, + "section": "Paragraphs" + }, + { + "markdown": "aaa \nbbb \n", + "html": "aaa
\nbbb
aaa
\n\n\n", + "example": 230, + "start_line": 3722, + "end_line": 3732, + "section": "Block quotes" + }, + { + "markdown": "># Foo\n>bar\n> baz\n", + "html": "Foo
\nbar\nbaz
\n
\n\n", + "example": 231, + "start_line": 3737, + "end_line": 3747, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "Foo
\nbar\nbaz
\n
\n\n", + "example": 232, + "start_line": 3752, + "end_line": 3762, + "section": "Block quotes" + }, + { + "markdown": " > # Foo\n > bar\n > baz\n", + "html": "Foo
\nbar\nbaz
\n
> # Foo\n> bar\n> baz\n\n",
+ "example": 233,
+ "start_line": 3767,
+ "end_line": 3776,
+ "section": "Block quotes"
+ },
+ {
+ "markdown": "> # Foo\n> bar\nbaz\n",
+ "html": "\n\n", + "example": 234, + "start_line": 3782, + "end_line": 3792, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n> foo\n", + "html": "Foo
\nbar\nbaz
\n
\n\n", + "example": 235, + "start_line": 3798, + "end_line": 3808, + "section": "Block quotes" + }, + { + "markdown": "> foo\n---\n", + "html": "bar\nbaz\nfoo
\n
\n\nfoo
\n
\n\n\n
\n- foo
\n
\n\n\nfoo\n
bar\n\n",
+ "example": 238,
+ "start_line": 3860,
+ "end_line": 3870,
+ "section": "Block quotes"
+ },
+ {
+ "markdown": "> ```\nfoo\n```\n",
+ "html": "\n\n\n
foo
\n\n",
+ "example": 239,
+ "start_line": 3873,
+ "end_line": 3883,
+ "section": "Block quotes"
+ },
+ {
+ "markdown": "> foo\n - bar\n",
+ "html": "\n\n", + "example": 240, + "start_line": 3889, + "end_line": 3897, + "section": "Block quotes" + }, + { + "markdown": ">\n", + "html": "foo\n- bar
\n
\n\n", + "example": 241, + "start_line": 3913, + "end_line": 3918, + "section": "Block quotes" + }, + { + "markdown": ">\n> \n> \n", + "html": "
\n\n", + "example": 242, + "start_line": 3921, + "end_line": 3928, + "section": "Block quotes" + }, + { + "markdown": ">\n> foo\n> \n", + "html": "
\n\n", + "example": 243, + "start_line": 3933, + "end_line": 3941, + "section": "Block quotes" + }, + { + "markdown": "> foo\n\n> bar\n", + "html": "foo
\n
\n\nfoo
\n
\n\n", + "example": 244, + "start_line": 3946, + "end_line": 3957, + "section": "Block quotes" + }, + { + "markdown": "> foo\n> bar\n", + "html": "bar
\n
\n\n", + "example": 245, + "start_line": 3968, + "end_line": 3976, + "section": "Block quotes" + }, + { + "markdown": "> foo\n>\n> bar\n", + "html": "foo\nbar
\n
\n\n", + "example": 246, + "start_line": 3981, + "end_line": 3990, + "section": "Block quotes" + }, + { + "markdown": "foo\n> bar\n", + "html": "foo
\nbar
\n
foo
\n\n\n", + "example": 247, + "start_line": 3995, + "end_line": 4003, + "section": "Block quotes" + }, + { + "markdown": "> aaa\n***\n> bbb\n", + "html": "bar
\n
\n\naaa
\n
\n\n", + "example": 248, + "start_line": 4009, + "end_line": 4021, + "section": "Block quotes" + }, + { + "markdown": "> bar\nbaz\n", + "html": "bbb
\n
\n\n", + "example": 249, + "start_line": 4027, + "end_line": 4035, + "section": "Block quotes" + }, + { + "markdown": "> bar\n\nbaz\n", + "html": "bar\nbaz
\n
\n\nbar
\n
baz
\n", + "example": 250, + "start_line": 4038, + "end_line": 4047, + "section": "Block quotes" + }, + { + "markdown": "> bar\n>\nbaz\n", + "html": "\n\nbar
\n
baz
\n", + "example": 251, + "start_line": 4050, + "end_line": 4059, + "section": "Block quotes" + }, + { + "markdown": "> > > foo\nbar\n", + "html": "\n\n", + "example": 252, + "start_line": 4066, + "end_line": 4078, + "section": "Block quotes" + }, + { + "markdown": ">>> foo\n> bar\n>>baz\n", + "html": "\n\n\n\nfoo\nbar
\n
\n\n", + "example": 253, + "start_line": 4081, + "end_line": 4095, + "section": "Block quotes" + }, + { + "markdown": "> code\n\n> not code\n", + "html": "\n\n\n\nfoo\nbar\nbaz
\n
\n\n\ncode\n
\n\n", + "example": 254, + "start_line": 4103, + "end_line": 4115, + "section": "Block quotes" + }, + { + "markdown": "A paragraph\nwith two lines.\n\n indented code\n\n> A block quote.\n", + "html": "not code
\n
A paragraph\nwith two lines.
\nindented code\n\n\n\n", + "example": 255, + "start_line": 4157, + "end_line": 4172, + "section": "List items" + }, + { + "markdown": "1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "A block quote.
\n
A paragraph\nwith two lines.
\nindented code\n\n\n\nA block quote.
\n
two
\n", + "example": 257, + "start_line": 4212, + "end_line": 4221, + "section": "List items" + }, + { + "markdown": "- one\n\n two\n", + "html": "one
\ntwo
\n two\n\n",
+ "example": 259,
+ "start_line": 4238,
+ "end_line": 4248,
+ "section": "List items"
+ },
+ {
+ "markdown": " - one\n\n two\n",
+ "html": "one
\ntwo
\n\n\n", + "example": 261, + "start_line": 4273, + "end_line": 4288, + "section": "List items" + }, + { + "markdown": ">>- one\n>>\n > > two\n", + "html": "\n\n\n
\n- \n
\none
\ntwo
\n
\n\n", + "example": 262, + "start_line": 4300, + "end_line": 4313, + "section": "List items" + }, + { + "markdown": "-one\n\n2.two\n", + "html": "\n\n\n
\n- one
\ntwo
\n
-one
\n2.two
\n", + "example": 263, + "start_line": 4319, + "end_line": 4326, + "section": "List items" + }, + { + "markdown": "- foo\n\n\n bar\n", + "html": "foo
\nbar
\nfoo
\nbar\n\nbaz
\n\n\nbam
\n
Foo
\nbar\n\n\nbaz\n\n1234567890. not ok
\n", + "example": 268, + "start_line": 4408, + "end_line": 4412, + "section": "List items" + }, + { + "markdown": "0. ok\n", + "html": "-1. not ok
\n", + "example": 271, + "start_line": 4437, + "end_line": 4441, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "foo
\nbar\n\nfoo
\nbar\n\nindented code\n\nparagraph
\nmore code\n\n",
+ "example": 274,
+ "start_line": 4496,
+ "end_line": 4508,
+ "section": "List items"
+ },
+ {
+ "markdown": "1. indented code\n\n paragraph\n\n more code\n",
+ "html": "indented code\n\nparagraph
\nmore code\n\n indented code\n\nparagraph
\nmore code\n\nfoo
\nbar
\n", + "example": 277, + "start_line": 4560, + "end_line": 4567, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "bar
\n", + "example": 278, + "start_line": 4570, + "end_line": 4579, + "section": "List items" + }, + { + "markdown": "- foo\n\n bar\n", + "html": "foo
\nbar
\nbar\n\nbaz\n\nfoo
\n", + "example": 282, + "start_line": 4654, + "end_line": 4663, + "section": "List items" + }, + { + "markdown": "- foo\n-\n- bar\n", + "html": "foo\n*
\nfoo\n1.
\n", + "example": 287, + "start_line": 4723, + "end_line": 4734, + "section": "List items" + }, + { + "markdown": " 1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n", + "html": "A paragraph\nwith two lines.
\nindented code\n\n\n\nA block quote.
\n
A paragraph\nwith two lines.
\nindented code\n\n\n\nA block quote.
\n
A paragraph\nwith two lines.
\nindented code\n\n\n\nA block quote.
\n
1. A paragraph\n with two lines.\n\n indented code\n\n > A block quote.\n\n",
+ "example": 291,
+ "start_line": 4817,
+ "end_line": 4832,
+ "section": "List items"
+ },
+ {
+ "markdown": " 1. A paragraph\nwith two lines.\n\n indented code\n\n > A block quote.\n",
+ "html": "A paragraph\nwith two lines.
\nindented code\n\n\n\nA block quote.
\n
\n\n", + "example": 294, + "start_line": 4884, + "end_line": 4898, + "section": "List items" + }, + { + "markdown": "> 1. > Blockquote\n> continued here.\n", + "html": "\n
\n- \n
\n\n\nBlockquote\ncontinued here.
\n
\n\n", + "example": 295, + "start_line": 4901, + "end_line": 4915, + "section": "List items" + }, + { + "markdown": "- foo\n - bar\n - baz\n - boo\n", + "html": "\n
\n- \n
\n\n\nBlockquote\ncontinued here.
\n
Foo
\nThe number of windows in my house is\n14. The number of doors is 6.
\n", + "example": 306, + "start_line": 5382, + "end_line": 5388, + "section": "Lists" + }, + { + "markdown": "The number of windows in my house is\n1. The number of doors is 6.\n", + "html": "The number of windows in my house is
\nfoo
\nbar
\nbaz
\nbaz
\nbim
\nfoo
\nnotcode
\nfoo
\ncode\n\n",
+ "example": 311,
+ "start_line": 5478,
+ "end_line": 5501,
+ "section": "Lists"
+ },
+ {
+ "markdown": "- a\n - b\n - c\n - d\n - e\n - f\n- g\n",
+ "html": "a
\nb
\nc
\na
\nb
\n3. c\n\n",
+ "example": 315,
+ "start_line": 5574,
+ "end_line": 5591,
+ "section": "Lists"
+ },
+ {
+ "markdown": "- a\n- b\n\n- c\n",
+ "html": "a
\nb
\nc
\na
\nc
\na
\nb
\nc
\nd
\na
\nb
\nd
\nb\n\n\n\nb
\nc
\n\n\nb
\n
\n\nb
\n
c\n\nfoo\n\nbar
\nfoo
\nbaz
\na
\nd
\nhilo`
foo
foo ` bar
``
``
a
b
\n
foo bar baz
foo
foo bar baz
foo\\bar`
foo`bar
foo `` bar
*foo*
[not a link](/foo)
<a href="">`
<https://foo.bar.baz>`
```foo``
\n", + "example": 349, + "start_line": 6097, + "end_line": 6101, + "section": "Code spans" + }, + { + "markdown": "`foo\n", + "html": "`foo
\n", + "example": 350, + "start_line": 6104, + "end_line": 6108, + "section": "Code spans" + }, + { + "markdown": "`foo``bar``\n", + "html": "`foobar
foo bar
\n", + "example": 352, + "start_line": 6330, + "end_line": 6334, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a * foo bar*\n", + "html": "a * foo bar*
\n", + "example": 353, + "start_line": 6340, + "end_line": 6344, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a*\"foo\"*\n", + "html": "a*"foo"*
\n", + "example": 354, + "start_line": 6351, + "end_line": 6355, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "* a *\n", + "html": "* a *
\n", + "example": 355, + "start_line": 6360, + "end_line": 6364, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*$*alpha.\n\n*£*bravo.\n\n*€*charlie.\n\n*𞋿*delta.\n", + "html": "*$*alpha.
\n*£*bravo.
\n*€*charlie.
\n*𞋿*delta.
\n", + "example": 356, + "start_line": 6369, + "end_line": 6382, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo*bar*\n", + "html": "foobar
\n", + "example": 357, + "start_line": 6387, + "end_line": 6391, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5*6*78\n", + "html": "5678
\n", + "example": 358, + "start_line": 6394, + "end_line": 6398, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar_\n", + "html": "foo bar
\n", + "example": 359, + "start_line": 6403, + "end_line": 6407, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_ foo bar_\n", + "html": "_ foo bar_
\n", + "example": 360, + "start_line": 6413, + "end_line": 6417, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a_\"foo\"_\n", + "html": "a_"foo"_
\n", + "example": 361, + "start_line": 6423, + "end_line": 6427, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo_bar_\n", + "html": "foo_bar_
\n", + "example": 362, + "start_line": 6432, + "end_line": 6436, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5_6_78\n", + "html": "5_6_78
\n", + "example": 363, + "start_line": 6439, + "end_line": 6443, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням_стремятся_\n", + "html": "пристаням_стремятся_
\n", + "example": 364, + "start_line": 6446, + "end_line": 6450, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "aa_\"bb\"_cc\n", + "html": "aa_"bb"_cc
\n", + "example": 365, + "start_line": 6456, + "end_line": 6460, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-_(bar)_\n", + "html": "foo-(bar)
\n", + "example": 366, + "start_line": 6467, + "end_line": 6471, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo*\n", + "html": "_foo*
\n", + "example": 367, + "start_line": 6479, + "end_line": 6483, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar *\n", + "html": "*foo bar *
\n", + "example": 368, + "start_line": 6489, + "end_line": 6493, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo bar\n*\n", + "html": "*foo bar\n*
\n", + "example": 369, + "start_line": 6498, + "end_line": 6504, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo)\n", + "html": "*(*foo)
\n", + "example": 370, + "start_line": 6511, + "end_line": 6515, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(*foo*)*\n", + "html": "(foo)
\n", + "example": 371, + "start_line": 6521, + "end_line": 6525, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo*bar\n", + "html": "foobar
\n", + "example": 372, + "start_line": 6530, + "end_line": 6534, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo bar _\n", + "html": "_foo bar _
\n", + "example": 373, + "start_line": 6543, + "end_line": 6547, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo)\n", + "html": "_(_foo)
\n", + "example": 374, + "start_line": 6553, + "end_line": 6557, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(_foo_)_\n", + "html": "(foo)
\n", + "example": 375, + "start_line": 6562, + "end_line": 6566, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar\n", + "html": "_foo_bar
\n", + "example": 376, + "start_line": 6571, + "end_line": 6575, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_пристаням_стремятся\n", + "html": "_пристаням_стремятся
\n", + "example": 377, + "start_line": 6578, + "end_line": 6582, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo_bar_baz_\n", + "html": "foo_bar_baz
\n", + "example": 378, + "start_line": 6585, + "end_line": 6589, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(bar)_.\n", + "html": "(bar).
\n", + "example": 379, + "start_line": 6596, + "end_line": 6600, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar**\n", + "html": "foo bar
\n", + "example": 380, + "start_line": 6605, + "end_line": 6609, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** foo bar**\n", + "html": "** foo bar**
\n", + "example": 381, + "start_line": 6615, + "end_line": 6619, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a**\"foo\"**\n", + "html": "a**"foo"**
\n", + "example": 382, + "start_line": 6626, + "end_line": 6630, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo**bar**\n", + "html": "foobar
\n", + "example": 383, + "start_line": 6635, + "end_line": 6639, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar__\n", + "html": "foo bar
\n", + "example": 384, + "start_line": 6644, + "end_line": 6648, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ foo bar__\n", + "html": "__ foo bar__
\n", + "example": 385, + "start_line": 6654, + "end_line": 6658, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__\nfoo bar__\n", + "html": "__\nfoo bar__
\n", + "example": 386, + "start_line": 6662, + "end_line": 6668, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "a__\"foo\"__\n", + "html": "a__"foo"__
\n", + "example": 387, + "start_line": 6674, + "end_line": 6678, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo__bar__\n", + "html": "foo__bar__
\n", + "example": 388, + "start_line": 6683, + "end_line": 6687, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "5__6__78\n", + "html": "5__6__78
\n", + "example": 389, + "start_line": 6690, + "end_line": 6694, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "пристаням__стремятся__\n", + "html": "пристаням__стремятся__
\n", + "example": 390, + "start_line": 6697, + "end_line": 6701, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo, __bar__, baz__\n", + "html": "foo, bar, baz
\n", + "example": 391, + "start_line": 6704, + "end_line": 6708, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo-__(bar)__\n", + "html": "foo-(bar)
\n", + "example": 392, + "start_line": 6715, + "end_line": 6719, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo bar **\n", + "html": "**foo bar **
\n", + "example": 393, + "start_line": 6728, + "end_line": 6732, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**(**foo)\n", + "html": "**(**foo)
\n", + "example": 394, + "start_line": 6741, + "end_line": 6745, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*(**foo**)*\n", + "html": "(foo)
\n", + "example": 395, + "start_line": 6751, + "end_line": 6755, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**Gomphocarpus (*Gomphocarpus physocarpus*, syn.\n*Asclepias physocarpa*)**\n", + "html": "Gomphocarpus (Gomphocarpus physocarpus, syn.\nAsclepias physocarpa)
\n", + "example": 396, + "start_line": 6758, + "end_line": 6764, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo \"*bar*\" foo**\n", + "html": "foo "bar" foo
\n", + "example": 397, + "start_line": 6767, + "end_line": 6771, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**bar\n", + "html": "foobar
\n", + "example": 398, + "start_line": 6776, + "end_line": 6780, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo bar __\n", + "html": "__foo bar __
\n", + "example": 399, + "start_line": 6788, + "end_line": 6792, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(__foo)\n", + "html": "__(__foo)
\n", + "example": 400, + "start_line": 6798, + "end_line": 6802, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_(__foo__)_\n", + "html": "(foo)
\n", + "example": 401, + "start_line": 6808, + "end_line": 6812, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar\n", + "html": "__foo__bar
\n", + "example": 402, + "start_line": 6817, + "end_line": 6821, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__пристаням__стремятся\n", + "html": "__пристаням__стремятся
\n", + "example": 403, + "start_line": 6824, + "end_line": 6828, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__bar__baz__\n", + "html": "foo__bar__baz
\n", + "example": 404, + "start_line": 6831, + "end_line": 6835, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__(bar)__.\n", + "html": "(bar).
\n", + "example": 405, + "start_line": 6842, + "end_line": 6846, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [bar](/url)*\n", + "html": "foo bar
\n", + "example": 406, + "start_line": 6854, + "end_line": 6858, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo\nbar*\n", + "html": "foo\nbar
\n", + "example": 407, + "start_line": 6861, + "end_line": 6867, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo __bar__ baz_\n", + "html": "foo bar baz
\n", + "example": 408, + "start_line": 6873, + "end_line": 6877, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo _bar_ baz_\n", + "html": "foo bar baz
\n", + "example": 409, + "start_line": 6880, + "end_line": 6884, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_ bar_\n", + "html": "foo bar
\n", + "example": 410, + "start_line": 6887, + "end_line": 6891, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo *bar**\n", + "html": "foo bar
\n", + "example": 411, + "start_line": 6894, + "end_line": 6898, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar** baz*\n", + "html": "foo bar baz
\n", + "example": 412, + "start_line": 6901, + "end_line": 6905, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar**baz*\n", + "html": "foobarbaz
\n", + "example": 413, + "start_line": 6907, + "end_line": 6911, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar*\n", + "html": "foo**bar
\n", + "example": 414, + "start_line": 6931, + "end_line": 6935, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo** bar*\n", + "html": "foo bar
\n", + "example": 415, + "start_line": 6944, + "end_line": 6948, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar***\n", + "html": "foo bar
\n", + "example": 416, + "start_line": 6951, + "end_line": 6955, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**bar***\n", + "html": "foobar
\n", + "example": 417, + "start_line": 6958, + "end_line": 6962, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo***bar***baz\n", + "html": "foobarbaz
\n", + "example": 418, + "start_line": 6969, + "end_line": 6973, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo******bar*********baz\n", + "html": "foobar***baz
\n", + "example": 419, + "start_line": 6975, + "end_line": 6979, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo **bar *baz* bim** bop*\n", + "html": "foo bar baz bim bop
\n", + "example": 420, + "start_line": 6984, + "end_line": 6988, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo [*bar*](/url)*\n", + "html": "foo bar
\n", + "example": 421, + "start_line": 6991, + "end_line": 6995, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "** is not an empty emphasis\n", + "html": "** is not an empty emphasis
\n", + "example": 422, + "start_line": 7000, + "end_line": 7004, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**** is not an empty strong emphasis\n", + "html": "**** is not an empty strong emphasis
\n", + "example": 423, + "start_line": 7007, + "end_line": 7011, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [bar](/url)**\n", + "html": "foo bar
\n", + "example": 424, + "start_line": 7020, + "end_line": 7024, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo\nbar**\n", + "html": "foo\nbar
\n", + "example": 425, + "start_line": 7027, + "end_line": 7033, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo _bar_ baz__\n", + "html": "foo bar baz
\n", + "example": 426, + "start_line": 7039, + "end_line": 7043, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo __bar__ baz__\n", + "html": "foo bar baz
\n", + "example": 427, + "start_line": 7046, + "end_line": 7050, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo__ bar__\n", + "html": "foo bar
\n", + "example": 428, + "start_line": 7053, + "end_line": 7057, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar****\n", + "html": "foo bar
\n", + "example": 429, + "start_line": 7060, + "end_line": 7064, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar* baz**\n", + "html": "foo bar baz
\n", + "example": 430, + "start_line": 7067, + "end_line": 7071, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*bar*baz**\n", + "html": "foobarbaz
\n", + "example": 431, + "start_line": 7074, + "end_line": 7078, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo* bar**\n", + "html": "foo bar
\n", + "example": 432, + "start_line": 7081, + "end_line": 7085, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar***\n", + "html": "foo bar
\n", + "example": 433, + "start_line": 7088, + "end_line": 7092, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo *bar **baz**\nbim* bop**\n", + "html": "foo bar baz\nbim bop
\n", + "example": 434, + "start_line": 7097, + "end_line": 7103, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo [*bar*](/url)**\n", + "html": "foo bar
\n", + "example": 435, + "start_line": 7106, + "end_line": 7110, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__ is not an empty emphasis\n", + "html": "__ is not an empty emphasis
\n", + "example": 436, + "start_line": 7115, + "end_line": 7119, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____ is not an empty strong emphasis\n", + "html": "____ is not an empty strong emphasis
\n", + "example": 437, + "start_line": 7122, + "end_line": 7126, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ***\n", + "html": "foo ***
\n", + "example": 438, + "start_line": 7132, + "end_line": 7136, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *\\**\n", + "html": "foo *
\n", + "example": 439, + "start_line": 7139, + "end_line": 7143, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *_*\n", + "html": "foo _
\n", + "example": 440, + "start_line": 7146, + "end_line": 7150, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo *****\n", + "html": "foo *****
\n", + "example": 441, + "start_line": 7153, + "end_line": 7157, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **\\***\n", + "html": "foo *
\n", + "example": 442, + "start_line": 7160, + "end_line": 7164, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo **_**\n", + "html": "foo _
\n", + "example": 443, + "start_line": 7167, + "end_line": 7171, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo*\n", + "html": "*foo
\n", + "example": 444, + "start_line": 7178, + "end_line": 7182, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo**\n", + "html": "foo*
\n", + "example": 445, + "start_line": 7185, + "end_line": 7189, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo**\n", + "html": "*foo
\n", + "example": 446, + "start_line": 7192, + "end_line": 7196, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo*\n", + "html": "***foo
\n", + "example": 447, + "start_line": 7199, + "end_line": 7203, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo***\n", + "html": "foo*
\n", + "example": 448, + "start_line": 7206, + "end_line": 7210, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo****\n", + "html": "foo***
\n", + "example": 449, + "start_line": 7213, + "end_line": 7217, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo ___\n", + "html": "foo ___
\n", + "example": 450, + "start_line": 7223, + "end_line": 7227, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _\\__\n", + "html": "foo _
\n", + "example": 451, + "start_line": 7230, + "end_line": 7234, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _*_\n", + "html": "foo *
\n", + "example": 452, + "start_line": 7237, + "end_line": 7241, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo _____\n", + "html": "foo _____
\n", + "example": 453, + "start_line": 7244, + "end_line": 7248, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __\\___\n", + "html": "foo _
\n", + "example": 454, + "start_line": 7251, + "end_line": 7255, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "foo __*__\n", + "html": "foo *
\n", + "example": 455, + "start_line": 7258, + "end_line": 7262, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo_\n", + "html": "_foo
\n", + "example": 456, + "start_line": 7265, + "end_line": 7269, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo__\n", + "html": "foo_
\n", + "example": 457, + "start_line": 7276, + "end_line": 7280, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "___foo__\n", + "html": "_foo
\n", + "example": 458, + "start_line": 7283, + "end_line": 7287, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo_\n", + "html": "___foo
\n", + "example": 459, + "start_line": 7290, + "end_line": 7294, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo___\n", + "html": "foo_
\n", + "example": 460, + "start_line": 7297, + "end_line": 7301, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo____\n", + "html": "foo___
\n", + "example": 461, + "start_line": 7304, + "end_line": 7308, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo**\n", + "html": "foo
\n", + "example": 462, + "start_line": 7314, + "end_line": 7318, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*_foo_*\n", + "html": "foo
\n", + "example": 463, + "start_line": 7321, + "end_line": 7325, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "__foo__\n", + "html": "foo
\n", + "example": 464, + "start_line": 7328, + "end_line": 7332, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_*foo*_\n", + "html": "foo
\n", + "example": 465, + "start_line": 7335, + "end_line": 7339, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "****foo****\n", + "html": "foo
\n", + "example": 466, + "start_line": 7345, + "end_line": 7349, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "____foo____\n", + "html": "foo
\n", + "example": 467, + "start_line": 7352, + "end_line": 7356, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "******foo******\n", + "html": "foo
\n", + "example": 468, + "start_line": 7363, + "end_line": 7367, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "***foo***\n", + "html": "foo
\n", + "example": 469, + "start_line": 7372, + "end_line": 7376, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_____foo_____\n", + "html": "foo
\n", + "example": 470, + "start_line": 7379, + "end_line": 7383, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo _bar* baz_\n", + "html": "foo _bar baz_
\n", + "example": 471, + "start_line": 7388, + "end_line": 7392, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo __bar *baz bim__ bam*\n", + "html": "foo bar *baz bim bam
\n", + "example": 472, + "start_line": 7395, + "end_line": 7399, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**foo **bar baz**\n", + "html": "**foo bar baz
\n", + "example": 473, + "start_line": 7404, + "end_line": 7408, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*foo *bar baz*\n", + "html": "*foo bar baz
\n", + "example": 474, + "start_line": 7411, + "end_line": 7415, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "*[bar*](/url)\n", + "html": "*bar*
\n", + "example": 475, + "start_line": 7420, + "end_line": 7424, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "_foo [bar_](/url)\n", + "html": "_foo bar_
\n", + "example": 476, + "start_line": 7427, + "end_line": 7431, + "section": "Emphasis and strong emphasis" + }, + { + "markdown": "**
a *
a _
[link](/my uri)
\n", + "example": 490, + "start_line": 7610, + "end_line": 7614, + "section": "Links" + }, + { + "markdown": "[link]([link](foo\nbar)
\n", + "example": 492, + "start_line": 7625, + "end_line": 7631, + "section": "Links" + }, + { + "markdown": "[link]([link](
[link](<foo>)
\n", + "example": 495, + "start_line": 7652, + "end_line": 7656, + "section": "Links" + }, + { + "markdown": "[a](\n[a](c)\n", + "html": "[a](<b)c\n[a](<b)c>\n[a](c)
\n", + "example": 496, + "start_line": 7661, + "end_line": 7669, + "section": "Links" + }, + { + "markdown": "[link](\\(foo\\))\n", + "html": "\n", + "example": 497, + "start_line": 7673, + "end_line": 7677, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar)))\n", + "html": "\n", + "example": 498, + "start_line": 7682, + "end_line": 7686, + "section": "Links" + }, + { + "markdown": "[link](foo(and(bar))\n", + "html": "[link](foo(and(bar))
\n", + "example": 499, + "start_line": 7691, + "end_line": 7695, + "section": "Links" + }, + { + "markdown": "[link](foo\\(and\\(bar\\))\n", + "html": "\n", + "example": 500, + "start_line": 7698, + "end_line": 7702, + "section": "Links" + }, + { + "markdown": "[link]([link](/url "title "and" title")
\n", + "example": 510, + "start_line": 7810, + "end_line": 7814, + "section": "Links" + }, + { + "markdown": "[link](/url 'title \"and\" title')\n", + "html": "\n", + "example": 511, + "start_line": 7819, + "end_line": 7823, + "section": "Links" + }, + { + "markdown": "[link]( /uri\n \"title\" )\n", + "html": "\n", + "example": 512, + "start_line": 7844, + "end_line": 7849, + "section": "Links" + }, + { + "markdown": "[link] (/uri)\n", + "html": "[link] (/uri)
\n", + "example": 513, + "start_line": 7855, + "end_line": 7859, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]](/uri)\n", + "html": "\n", + "example": 514, + "start_line": 7865, + "end_line": 7869, + "section": "Links" + }, + { + "markdown": "[link] bar](/uri)\n", + "html": "[link] bar](/uri)
\n", + "example": 515, + "start_line": 7872, + "end_line": 7876, + "section": "Links" + }, + { + "markdown": "[link [bar](/uri)\n", + "html": "[link bar
\n", + "example": 516, + "start_line": 7879, + "end_line": 7883, + "section": "Links" + }, + { + "markdown": "[link \\[bar](/uri)\n", + "html": "\n", + "example": 517, + "start_line": 7886, + "end_line": 7890, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*](/uri)\n", + "html": "\n", + "example": 518, + "start_line": 7895, + "end_line": 7899, + "section": "Links" + }, + { + "markdown": "[](/uri)\n", + "html": "\n", + "example": 519, + "start_line": 7902, + "end_line": 7906, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)](/uri)\n", + "html": "[foo bar](/uri)
\n", + "example": 520, + "start_line": 7911, + "end_line": 7915, + "section": "Links" + }, + { + "markdown": "[foo *[bar [baz](/uri)](/uri)*](/uri)\n", + "html": "[foo [bar baz](/uri)](/uri)
\n", + "example": 521, + "start_line": 7918, + "end_line": 7922, + "section": "Links" + }, + { + "markdown": "](uri2)](uri3)\n", + "html": "*foo*
\n", + "example": 523, + "start_line": 7935, + "end_line": 7939, + "section": "Links" + }, + { + "markdown": "[foo *bar](baz*)\n", + "html": "\n", + "example": 524, + "start_line": 7942, + "end_line": 7946, + "section": "Links" + }, + { + "markdown": "*foo [bar* baz]\n", + "html": "foo [bar baz]
\n", + "example": 525, + "start_line": 7952, + "end_line": 7956, + "section": "Links" + }, + { + "markdown": "[foo[foo
[foo](/uri)
[foohttps://example.com/?search=](uri)
\n", + "example": 528, + "start_line": 7976, + "end_line": 7980, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[bar]: /url \"title\"\n", + "html": "\n", + "example": 529, + "start_line": 8014, + "end_line": 8020, + "section": "Links" + }, + { + "markdown": "[link [foo [bar]]][ref]\n\n[ref]: /uri\n", + "html": "\n", + "example": 530, + "start_line": 8029, + "end_line": 8035, + "section": "Links" + }, + { + "markdown": "[link \\[bar][ref]\n\n[ref]: /uri\n", + "html": "\n", + "example": 531, + "start_line": 8038, + "end_line": 8044, + "section": "Links" + }, + { + "markdown": "[link *foo **bar** `#`*][ref]\n\n[ref]: /uri\n", + "html": "\n", + "example": 532, + "start_line": 8049, + "end_line": 8055, + "section": "Links" + }, + { + "markdown": "[][ref]\n\n[ref]: /uri\n", + "html": "\n", + "example": 533, + "start_line": 8058, + "end_line": 8064, + "section": "Links" + }, + { + "markdown": "[foo [bar](/uri)][ref]\n\n[ref]: /uri\n", + "html": "\n", + "example": 534, + "start_line": 8069, + "end_line": 8075, + "section": "Links" + }, + { + "markdown": "[foo *bar [baz][ref]*][ref]\n\n[ref]: /uri\n", + "html": "\n", + "example": 535, + "start_line": 8078, + "end_line": 8084, + "section": "Links" + }, + { + "markdown": "*[foo*][ref]\n\n[ref]: /uri\n", + "html": "*foo*
\n", + "example": 536, + "start_line": 8093, + "end_line": 8099, + "section": "Links" + }, + { + "markdown": "[foo *bar][ref]*\n\n[ref]: /uri\n", + "html": "\n", + "example": 537, + "start_line": 8102, + "end_line": 8108, + "section": "Links" + }, + { + "markdown": "[foo[foo
[foo][ref]
[foohttps://example.com/?search=][ref]
\n", + "example": 540, + "start_line": 8132, + "end_line": 8138, + "section": "Links" + }, + { + "markdown": "[foo][BaR]\n\n[bar]: /url \"title\"\n", + "html": "\n", + "example": 541, + "start_line": 8143, + "end_line": 8149, + "section": "Links" + }, + { + "markdown": "[ẞ]\n\n[SS]: /url\n", + "html": "\n", + "example": 542, + "start_line": 8154, + "end_line": 8160, + "section": "Links" + }, + { + "markdown": "[Foo\n bar]: /url\n\n[Baz][Foo bar]\n", + "html": "\n", + "example": 543, + "start_line": 8166, + "end_line": 8173, + "section": "Links" + }, + { + "markdown": "[foo] [bar]\n\n[bar]: /url \"title\"\n", + "html": "[foo] bar
\n", + "example": 544, + "start_line": 8179, + "end_line": 8185, + "section": "Links" + }, + { + "markdown": "[foo]\n[bar]\n\n[bar]: /url \"title\"\n", + "html": "[foo]\nbar
\n", + "example": 545, + "start_line": 8188, + "end_line": 8196, + "section": "Links" + }, + { + "markdown": "[foo]: /url1\n\n[foo]: /url2\n\n[bar][foo]\n", + "html": "\n", + "example": 546, + "start_line": 8229, + "end_line": 8237, + "section": "Links" + }, + { + "markdown": "[bar][foo\\!]\n\n[foo!]: /url\n", + "html": "[bar][foo!]
\n", + "example": 547, + "start_line": 8244, + "end_line": 8250, + "section": "Links" + }, + { + "markdown": "[foo][ref[]\n\n[ref[]: /uri\n", + "html": "[foo][ref[]
\n[ref[]: /uri
\n", + "example": 548, + "start_line": 8256, + "end_line": 8263, + "section": "Links" + }, + { + "markdown": "[foo][ref[bar]]\n\n[ref[bar]]: /uri\n", + "html": "[foo][ref[bar]]
\n[ref[bar]]: /uri
\n", + "example": 549, + "start_line": 8266, + "end_line": 8273, + "section": "Links" + }, + { + "markdown": "[[[foo]]]\n\n[[[foo]]]: /url\n", + "html": "[[[foo]]]
\n[[[foo]]]: /url
\n", + "example": 550, + "start_line": 8276, + "end_line": 8283, + "section": "Links" + }, + { + "markdown": "[foo][ref\\[]\n\n[ref\\[]: /uri\n", + "html": "\n", + "example": 551, + "start_line": 8286, + "end_line": 8292, + "section": "Links" + }, + { + "markdown": "[bar\\\\]: /uri\n\n[bar\\\\]\n", + "html": "\n", + "example": 552, + "start_line": 8297, + "end_line": 8303, + "section": "Links" + }, + { + "markdown": "[]\n\n[]: /uri\n", + "html": "[]
\n[]: /uri
\n", + "example": 553, + "start_line": 8309, + "end_line": 8316, + "section": "Links" + }, + { + "markdown": "[\n ]\n\n[\n ]: /uri\n", + "html": "[\n]
\n[\n]: /uri
\n", + "example": 554, + "start_line": 8319, + "end_line": 8330, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url \"title\"\n", + "html": "\n", + "example": 555, + "start_line": 8342, + "end_line": 8348, + "section": "Links" + }, + { + "markdown": "[*foo* bar][]\n\n[*foo* bar]: /url \"title\"\n", + "html": "\n", + "example": 556, + "start_line": 8351, + "end_line": 8357, + "section": "Links" + }, + { + "markdown": "[Foo][]\n\n[foo]: /url \"title\"\n", + "html": "\n", + "example": 557, + "start_line": 8362, + "end_line": 8368, + "section": "Links" + }, + { + "markdown": "[foo] \n[]\n\n[foo]: /url \"title\"\n", + "html": "foo\n[]
\n", + "example": 558, + "start_line": 8375, + "end_line": 8383, + "section": "Links" + }, + { + "markdown": "[foo]\n\n[foo]: /url \"title\"\n", + "html": "\n", + "example": 559, + "start_line": 8395, + "end_line": 8401, + "section": "Links" + }, + { + "markdown": "[*foo* bar]\n\n[*foo* bar]: /url \"title\"\n", + "html": "\n", + "example": 560, + "start_line": 8404, + "end_line": 8410, + "section": "Links" + }, + { + "markdown": "[[*foo* bar]]\n\n[*foo* bar]: /url \"title\"\n", + "html": "[foo bar]
\n", + "example": 561, + "start_line": 8413, + "end_line": 8419, + "section": "Links" + }, + { + "markdown": "[[bar [foo]\n\n[foo]: /url\n", + "html": "[[bar foo
\n", + "example": 562, + "start_line": 8422, + "end_line": 8428, + "section": "Links" + }, + { + "markdown": "[Foo]\n\n[foo]: /url \"title\"\n", + "html": "\n", + "example": 563, + "start_line": 8433, + "end_line": 8439, + "section": "Links" + }, + { + "markdown": "[foo] bar\n\n[foo]: /url\n", + "html": "foo bar
\n", + "example": 564, + "start_line": 8444, + "end_line": 8450, + "section": "Links" + }, + { + "markdown": "\\[foo]\n\n[foo]: /url \"title\"\n", + "html": "[foo]
\n", + "example": 565, + "start_line": 8456, + "end_line": 8462, + "section": "Links" + }, + { + "markdown": "[foo*]: /url\n\n*[foo*]\n", + "html": "*foo*
\n", + "example": 566, + "start_line": 8468, + "end_line": 8474, + "section": "Links" + }, + { + "markdown": "[foo][bar]\n\n[foo]: /url1\n[bar]: /url2\n", + "html": "\n", + "example": 567, + "start_line": 8480, + "end_line": 8487, + "section": "Links" + }, + { + "markdown": "[foo][]\n\n[foo]: /url1\n", + "html": "\n", + "example": 568, + "start_line": 8489, + "end_line": 8495, + "section": "Links" + }, + { + "markdown": "[foo]()\n\n[foo]: /url1\n", + "html": "\n", + "example": 569, + "start_line": 8499, + "end_line": 8505, + "section": "Links" + }, + { + "markdown": "[foo](not a link)\n\n[foo]: /url1\n", + "html": "foo(not a link)
\n", + "example": 570, + "start_line": 8507, + "end_line": 8513, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url\n", + "html": "[foo]bar
\n", + "example": 571, + "start_line": 8518, + "end_line": 8524, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[bar]: /url2\n", + "html": "\n", + "example": 572, + "start_line": 8530, + "end_line": 8537, + "section": "Links" + }, + { + "markdown": "[foo][bar][baz]\n\n[baz]: /url1\n[foo]: /url2\n", + "html": "[foo]bar
\n", + "example": 573, + "start_line": 8543, + "end_line": 8550, + "section": "Links" + }, + { + "markdown": "\n", + "html": "



My 
\n[]
![[foo]]
\n[[foo]]: /url "title"
\n", + "example": 592, + "start_line": 8736, + "end_line": 8743, + "section": "Images" + }, + { + "markdown": "![Foo]\n\n[foo]: /url \"title\"\n", + "html": "![foo]
\n", + "example": 594, + "start_line": 8760, + "end_line": 8766, + "section": "Images" + }, + { + "markdown": "\\![foo]\n\n[foo]: /url \"title\"\n", + "html": "!foo
\n", + "example": 595, + "start_line": 8772, + "end_line": 8778, + "section": "Images" + }, + { + "markdown": "https://foo.bar.baz/test?q=hello&id=22&boolean
\n", + "example": 597, + "start_line": 8812, + "end_line": 8816, + "section": "Autolinks" + }, + { + "markdown": "<https://foo.bar/baz bim>
\n", + "example": 604, + "start_line": 8870, + "end_line": 8874, + "section": "Autolinks" + }, + { + "markdown": "<foo+@bar.example.com>
\n", + "example": 608, + "start_line": 8917, + "end_line": 8921, + "section": "Autolinks" + }, + { + "markdown": "<>\n", + "html": "<>
\n", + "example": 609, + "start_line": 8926, + "end_line": 8930, + "section": "Autolinks" + }, + { + "markdown": "< https://foo.bar >\n", + "html": "< https://foo.bar >
\n", + "example": 610, + "start_line": 8933, + "end_line": 8937, + "section": "Autolinks" + }, + { + "markdown": "<m:abc>
\n", + "example": 611, + "start_line": 8940, + "end_line": 8944, + "section": "Autolinks" + }, + { + "markdown": "<foo.bar.baz>
\n", + "example": 612, + "start_line": 8947, + "end_line": 8951, + "section": "Autolinks" + }, + { + "markdown": "https://example.com\n", + "html": "https://example.com
\n", + "example": 613, + "start_line": 8954, + "end_line": 8958, + "section": "Autolinks" + }, + { + "markdown": "foo@bar.example.com\n", + "html": "foo@bar.example.com
\n", + "example": 614, + "start_line": 8961, + "end_line": 8965, + "section": "Autolinks" + }, + { + "markdown": "Foo
<33> <__>
\n", + "example": 620, + "start_line": 9090, + "end_line": 9094, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "<a h*#ref="hi">
\n", + "example": 621, + "start_line": 9099, + "end_line": 9103, + "section": "Raw HTML" + }, + { + "markdown": " \n", + "html": "<a href="hi'> <a href=hi'>
\n", + "example": 622, + "start_line": 9108, + "end_line": 9112, + "section": "Raw HTML" + }, + { + "markdown": "< a><\nfoo>< a><\nfoo><bar/ >\n<foo bar=baz\nbim!bop />
\n", + "example": 623, + "start_line": 9117, + "end_line": 9127, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "<a href='bar'title=title>
\n", + "example": 624, + "start_line": 9132, + "end_line": 9136, + "section": "Raw HTML" + }, + { + "markdown": "</a href="foo">
\n", + "example": 626, + "start_line": 9150, + "end_line": 9154, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "foo
\n", + "example": 627, + "start_line": 9159, + "end_line": 9165, + "section": "Raw HTML" + }, + { + "markdown": "foo foo -->\n\nfoo foo -->\n", + "html": "foo foo -->
\nfoo foo -->
\n", + "example": 628, + "start_line": 9167, + "end_line": 9174, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "foo
\n", + "example": 629, + "start_line": 9179, + "end_line": 9183, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "foo
\n", + "example": 630, + "start_line": 9188, + "end_line": 9192, + "section": "Raw HTML" + }, + { + "markdown": "foo &<]]>\n", + "html": "foo &<]]>
\n", + "example": 631, + "start_line": 9197, + "end_line": 9201, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "\n", + "example": 632, + "start_line": 9207, + "end_line": 9211, + "section": "Raw HTML" + }, + { + "markdown": "foo \n", + "html": "\n", + "example": 633, + "start_line": 9216, + "end_line": 9220, + "section": "Raw HTML" + }, + { + "markdown": "\n", + "html": "<a href=""">
\n", + "example": 634, + "start_line": 9223, + "end_line": 9227, + "section": "Raw HTML" + }, + { + "markdown": " quoted text\n", + "html": "<a
\n\n\n", + "example": 635, + "start_line": 9233, + "end_line": 9241, + "section": "Raw HTML" + }, + { + "markdown": "foo \nbaz\n", + "html": "quoted text
\n
foo
\nbaz
foo
\nbaz
foo
\nbaz
foo
\nbar
foo
\nbar
foo
\nbar
foo
\nbar
code span
code\\ span
foo\\
\n", + "example": 647, + "start_line": 9366, + "end_line": 9370, + "section": "Hard line breaks" + }, + { + "markdown": "foo \n", + "html": "foo
\n", + "example": 648, + "start_line": 9373, + "end_line": 9377, + "section": "Hard line breaks" + }, + { + "markdown": "### foo\\\n", + "html": "foo\nbaz
\n", + "example": 651, + "start_line": 9402, + "end_line": 9408, + "section": "Soft line breaks" + }, + { + "markdown": "foo \n baz\n", + "html": "foo\nbaz
\n", + "example": 652, + "start_line": 9414, + "end_line": 9420, + "section": "Soft line breaks" + }, + { + "markdown": "hello $.;'there\n", + "html": "hello $.;'there
\n", + "example": 653, + "start_line": 9434, + "end_line": 9438, + "section": "Textual content" + }, + { + "markdown": "Foo χρῆν\n", + "html": "Foo χρῆν
\n", + "example": 654, + "start_line": 9441, + "end_line": 9445, + "section": "Textual content" + }, + { + "markdown": "Multiple spaces\n", + "html": "Multiple spaces
\n", + "example": 655, + "start_line": 9450, + "end_line": 9454, + "section": "Textual content" + } +] diff --git a/retropikzel/commonmark/test.scm b/retropikzel/commonmark/test.scm new file mode 100644 index 0000000..f87fbf0 --- /dev/null +++ b/retropikzel/commonmark/test.scm @@ -0,0 +1,22 @@ + +(define tests + (with-input-from-file + "retropikzel/commonmark/spec.json" + (lambda () + (json-read (current-input-port))))) + +(define current-test-group "") + +(vector-for-each + (lambda (test) + (let ((section (cdr (assoc 'section test))) + (number (cdr (assoc 'example test))) + (markdown (cdr (assoc 'markdown test))) + (html (cdr (assoc 'html test)))) + (when (not (string=? current-test-group section)) + (set! current-test-group section) + (test-begin section)) + (test-assert (number->string number) + (string=? html + (commonmark->html (open-input-string markdown)))))) + tests)