0s autopkgtest [15:57:33]: starting date and time: 2025-10-18 15:57:33+0000 0s autopkgtest [15:57:33]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [15:57:33]: host juju-7f2275-prod-proposed-migration-environment-20; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.q9h49xqn/out --timeout-copy=6000 -a i386 --setup-commands /home/ubuntu/autopkgtest-cloud/worker-config-production/setup-canonical.sh --apt-pocket=proposed=src:python3-defaults --apt-upgrade commonmark-bkrs --timeout-short=300 --timeout-copy=20000 --timeout-build=20000 --env=ADT_TEST_TRIGGERS=python3-defaults/3.13.7-2 -- ssh -s /home/ubuntu/autopkgtest/ssh-setup/nova -- --flavor autopkgtest-cpu2-ram4-disk20-amd64 --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-20@sto01-1.secgroup --name adt-resolute-i386-commonmark-bkrs-20251018-155732-juju-7f2275-prod-proposed-migration-environment-20-057dbb57-eafb-4801-afda-fd7693217a41 --image adt/ubuntu-resolute-amd64-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-20 --net-id=net_prod-autopkgtest-workers-amd64 -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 3s Creating nova instance adt-resolute-i386-commonmark-bkrs-20251018-155732-juju-7f2275-prod-proposed-migration-environment-20-057dbb57-eafb-4801-afda-fd7693217a41 from image adt/ubuntu-resolute-amd64-server-20251018.img (UUID dd697a48-b6cc-4a02-84bf-0f9f2fad5f89)... 30s autopkgtest [15:58:03]: testbed dpkg architecture: amd64 30s autopkgtest [15:58:03]: testbed apt version: 3.1.6ubuntu2 30s autopkgtest [15:58:03]: @@@@@@@@@@@@@@@@@@@@ test bed setup 30s autopkgtest [15:58:03]: testbed release detected to be: None 31s autopkgtest [15:58:04]: updating testbed package index (apt update) 31s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [83.3 kB] 31s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 31s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 31s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 31s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [28.4 kB] 31s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [345 kB] 31s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [15.4 kB] 31s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [5028 B] 31s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main i386 Packages [46.6 kB] 31s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 Packages [85.2 kB] 31s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/restricted i386 Packages [3208 B] 31s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/restricted amd64 Packages [28.0 kB] 31s Get:13 http://ftpmaster.internal/ubuntu resolute-proposed/universe i386 Packages [87.6 kB] 31s Get:14 http://ftpmaster.internal/ubuntu resolute-proposed/universe amd64 Packages [233 kB] 31s Get:15 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse i386 Packages [2772 B] 31s Get:16 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse amd64 Packages [8376 B] 32s Fetched 972 kB in 1s (1676 kB/s) 32s Reading package lists... 32s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 33s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 33s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 33s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 33s Reading package lists... 33s Reading package lists... 33s Building dependency tree... 33s Reading state information... 33s Calculating upgrade... 33s The following packages will be upgraded: 33s apt gir1.2-girepository-2.0 libapt-pkg7.0 libgirepository-1.0-1 33s libpython3-stdlib python3 python3-minimal 33s 7 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 33s Need to get 2751 kB of archives. 33s After this operation, 2048 B of additional disk space will be used. 33s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3-minimal amd64 3.13.7-2 [27.8 kB] 33s Get:2 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 python3 amd64 3.13.7-2 [23.9 kB] 33s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main amd64 libpython3-stdlib amd64 3.13.7-2 [10.6 kB] 33s Get:4 http://ftpmaster.internal/ubuntu resolute/main amd64 libapt-pkg7.0 amd64 3.1.8ubuntu1 [1140 kB] 34s Get:5 http://ftpmaster.internal/ubuntu resolute/main amd64 apt amd64 3.1.8ubuntu1 [1438 kB] 34s Get:6 http://ftpmaster.internal/ubuntu resolute/main amd64 libgirepository-1.0-1 amd64 1.86.0-6 [85.9 kB] 34s Get:7 http://ftpmaster.internal/ubuntu resolute/main amd64 gir1.2-girepository-2.0 amd64 1.86.0-6 [25.3 kB] 34s dpkg-preconfigure: unable to re-open stdin: No such file or directory 34s Fetched 2751 kB in 0s (6944 kB/s) 34s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78439 files and directories currently installed.) 34s Preparing to unpack .../python3-minimal_3.13.7-2_amd64.deb ... 34s Unpacking python3-minimal (3.13.7-2) over (3.13.7-1) ... 34s Setting up python3-minimal (3.13.7-2) ... 34s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78439 files and directories currently installed.) 34s Preparing to unpack .../0-python3_3.13.7-2_amd64.deb ... 34s running python pre-rtupdate hooks for python3.13... 34s Unpacking python3 (3.13.7-2) over (3.13.7-1) ... 34s Preparing to unpack .../1-libpython3-stdlib_3.13.7-2_amd64.deb ... 34s Unpacking libpython3-stdlib:amd64 (3.13.7-2) over (3.13.7-1) ... 34s Preparing to unpack .../2-libapt-pkg7.0_3.1.8ubuntu1_amd64.deb ... 34s Unpacking libapt-pkg7.0:amd64 (3.1.8ubuntu1) over (3.1.6ubuntu2) ... 34s Preparing to unpack .../3-apt_3.1.8ubuntu1_amd64.deb ... 34s Unpacking apt (3.1.8ubuntu1) over (3.1.6ubuntu2) ... 34s Preparing to unpack .../4-libgirepository-1.0-1_1.86.0-6_amd64.deb ... 34s Unpacking libgirepository-1.0-1:amd64 (1.86.0-6) over (1.84.0-1) ... 35s Preparing to unpack .../5-gir1.2-girepository-2.0_1.86.0-6_amd64.deb ... 35s Unpacking gir1.2-girepository-2.0:amd64 (1.86.0-6) over (1.84.0-1) ... 35s Setting up libgirepository-1.0-1:amd64 (1.86.0-6) ... 35s Setting up libapt-pkg7.0:amd64 (3.1.8ubuntu1) ... 35s Setting up libpython3-stdlib:amd64 (3.13.7-2) ... 35s Setting up apt (3.1.8ubuntu1) ... 35s Setting up python3 (3.13.7-2) ... 35s running python rtupdate hooks for python3.13... 35s running python post-rtupdate hooks for python3.13... 35s Setting up gir1.2-girepository-2.0:amd64 (1.86.0-6) ... 35s Processing triggers for man-db (2.13.1-1) ... 36s Processing triggers for libc-bin (2.42-0ubuntu3) ... 36s autopkgtest [15:58:09]: upgrading testbed (apt dist-upgrade and autopurge) 37s Reading package lists... 37s Building dependency tree... 37s Reading state information... 37s Calculating upgrade... 37s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 37s Reading package lists... 37s Building dependency tree... 37s Reading state information... 37s Solving dependencies... 37s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 37s autopkgtest [15:58:10]: rebooting testbed after setup commands that affected boot 53s autopkgtest [15:58:26]: testbed running kernel: Linux 6.17.0-5-generic #5-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 10:00:33 UTC 2025 55s autopkgtest [15:58:28]: @@@@@@@@@@@@@@@@@@@@ apt-source commonmark-bkrs 57s Get:1 http://ftpmaster.internal/ubuntu resolute/universe commonmark-bkrs 0.5.4+ds-7.1 (dsc) [2272 B] 57s Get:2 http://ftpmaster.internal/ubuntu resolute/universe commonmark-bkrs 0.5.4+ds-7.1 (tar) [81.9 kB] 57s Get:3 http://ftpmaster.internal/ubuntu resolute/universe commonmark-bkrs 0.5.4+ds-7.1 (diff) [6860 B] 57s gpgv: Signature made Thu Feb 8 00:40:02 2024 UTC 57s gpgv: using RSA key D56571B88A8BBAF140BF63D6BD7EAA60778FA6F5 57s gpgv: issuer "doko@debian.org" 57s gpgv: Can't check signature: No public key 57s dpkg-source: warning: cannot verify inline signature for ./commonmark-bkrs_0.5.4+ds-7.1.dsc: no acceptable signature found 57s autopkgtest [15:58:30]: testing package commonmark-bkrs version 0.5.4+ds-7.1 57s autopkgtest [15:58:30]: build not needed 57s autopkgtest [15:58:30]: test command1: preparing testbed 57s Reading package lists... 57s Building dependency tree... 57s Reading state information... 58s Solving dependencies... 58s The following NEW packages will be installed: 58s python-commonmark-bkrs-doc python3-commonmark-bkrs 58s 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 58s Need to get 95.7 kB of archives. 58s After this operation, 1084 kB of additional disk space will be used. 58s Get:1 http://ftpmaster.internal/ubuntu resolute/universe amd64 python-commonmark-bkrs-doc all 0.5.4+ds-7.1 [64.2 kB] 58s Get:2 http://ftpmaster.internal/ubuntu resolute/universe amd64 python3-commonmark-bkrs all 0.5.4+ds-7.1 [31.4 kB] 58s Fetched 95.7 kB in 0s (489 kB/s) 58s Selecting previously unselected package python-commonmark-bkrs-doc. 58s (Reading database ... (Reading database ... 5% (Reading database ... 10% (Reading database ... 15% (Reading database ... 20% (Reading database ... 25% (Reading database ... 30% (Reading database ... 35% (Reading database ... 40% (Reading database ... 45% (Reading database ... 50% (Reading database ... 55% (Reading database ... 60% (Reading database ... 65% (Reading database ... 70% (Reading database ... 75% (Reading database ... 80% (Reading database ... 85% (Reading database ... 90% (Reading database ... 95% (Reading database ... 100% (Reading database ... 78439 files and directories currently installed.) 58s Preparing to unpack .../python-commonmark-bkrs-doc_0.5.4+ds-7.1_all.deb ... 58s Unpacking python-commonmark-bkrs-doc (0.5.4+ds-7.1) ... 58s Selecting previously unselected package python3-commonmark-bkrs. 58s Preparing to unpack .../python3-commonmark-bkrs_0.5.4+ds-7.1_all.deb ... 58s Unpacking python3-commonmark-bkrs (0.5.4+ds-7.1) ... 58s Setting up python-commonmark-bkrs-doc (0.5.4+ds-7.1) ... 58s Setting up python3-commonmark-bkrs (0.5.4+ds-7.1) ... 58s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:186: SyntaxWarning: invalid escape sequence '\s' 58s return bool(re.compile("^\s*$").match(s)) 58s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:338: SyntaxWarning: invalid escape sequence '\/' 58s "^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>") 58s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:385: SyntaxWarning: invalid escape sequence '\s' 58s numdelims <= 3) and (not re.match("\s", char_after)) 58s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:387: SyntaxWarning: invalid escape sequence '\s' 58s numdelims <= 3) and (not re.match("\s", char_before)) 58s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:1008: SyntaxWarning: invalid escape sequence '\g' 58s re.sub(r'(?:(\\#) *#*| *#+) *$', '\g<1>', ln[offset:])] 58s Processing triggers for man-db (2.13.1-1) ... 59s autopkgtest [15:58:32]: test environment configured for cross building 59s autopkgtest [15:58:32]: test command1: cd /usr/share/doc/python-commonmark-bkrs-doc/tests/ && python3 test-CommonMark.py 59s autopkgtest [15:58:32]: test command1: [----------------------- 60s /usr/share/doc/python-commonmark-bkrs-doc/examples/tests/test-CommonMark.py:67: SyntaxWarning: invalid escape sequence '\.' 60s testMatch = re.findall(re.compile("^\.\n([\s\S]*?)^\.\n([\s\S]*?)^.$|^#{1,6} *(.*)$", re.M), tests) 60s [95m[Preprocessing][0m 60s Test #1 60s [92mtick[0m 60s Test #2 60s [92mtick[0m 60s [95m[Precedence][0m 60s Test #3 60s [92mtick[0m 60s [95m[Horizontal rules][0m 60s Test #4 60s [92mtick[0m 60s Test #5 60s [92mtick[0m 60s Test #6 60s [92mtick[0m 60s Test #7 60s [92mtick[0m 60s Test #8 60s [92mtick[0m 60s Test #9 60s [92mtick[0m 60s Test #10 60s [92mtick[0m 60s Test #11 60s [92mtick[0m 60s Test #12 60s [92mtick[0m 60s Test #13 60s [92mtick[0m 60s Test #14 60s [92mtick[0m 60s Test #15 60s [92mtick[0m 60s Test #16 60s [92mtick[0m 60s Test #17 60s [92mtick[0m 60s Test #18 60s [92mtick[0m 60s Test #19 60s [92mtick[0m 60s Test #20 60s [92mtick[0m 60s Test #21 60s [92mtick[0m 60s Test #22 60s [92mtick[0m 60s [95m[ATX headers][0m 60s Test #23 60s [92mtick[0m 60s Test #24 60s [92mtick[0m 60s Test #25 60s [92mtick[0m 60s Test #26 60s [92mtick[0m 60s Test #27 60s [92mtick[0m 60s Test #28 60s [92mtick[0m 60s Test #29 60s [92mtick[0m 60s Test #30 60s [92mtick[0m 60s Test #31 60s [92mtick[0m 60s Test #32 60s [92mtick[0m 60s Test #33 60s [92mtick[0m 60s Test #34 60s [92mtick[0m 60s Test #35 60s [92mtick[0m 60s Test #36 60s [92mtick[0m 60s Test #37 60s [92mtick[0m 60s Test #38 60s [92mtick[0m 60s Test #39 60s [92mtick[0m 60s [95m[Setext headers][0m 60s Test #40 60s [92mtick[0m 60s Test #41 60s [92mtick[0m 60s Test #42 60s [92mtick[0m 60s Test #43 60s [92mtick[0m 60s Test #44 60s [92mtick[0m 60s Test #45 60s [92mtick[0m 60s Test #46 60s [92mtick[0m 60s Test #47 60s [92mtick[0m 60s Test #48 60s [92mtick[0m 60s Test #49 60s [92mtick[0m 60s Test #50 60s [92mtick[0m 60s Test #51 60s [92mtick[0m 60s Test #52 60s [92mtick[0m 60s Test #53 60s [92mtick[0m 60s [95m[Indented code blocks][0m 60s Test #54 60s [92mtick[0m 60s Test #55 60s [92mtick[0m 60s Test #56 60s [92mtick[0m 60s Test #57 60s [92mtick[0m 60s Test #58 60s [92mtick[0m 60s Test #59 60s [92mtick[0m 60s Test #60 60s [92mtick[0m 60s Test #61 60s [92mtick[0m 60s Test #62 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s ␣␣␣␣ 60s ␣␣␣␣foo 60s ␣␣␣␣ 60s 60s [93m 60s === expected =============== 60s [0m
foo
60s
60s [93m
60s === got ====================
60s [0mfoo
60s
60s
60s
60s Test #63
60s [92mtick[0m
60s [95m[Fenced code blocks][0m
60s Test #64
60s [92mtick[0m
60s Test #65
60s [92mtick[0m
60s Test #66
60s [92mtick[0m
60s Test #67
60s [92mtick[0m
60s Test #68
60s [92mtick[0m
60s Test #69
60s [92mtick[0m
60s Test #70
60s [92mtick[0m
60s Test #71
60s [92mtick[0m
60s Test #72
60s [92mtick[0m
60s Test #73
60s [92mtick[0m
60s Test #74
60s [92mtick[0m
60s Test #75
60s [92mtick[0m
60s Test #76
60s [92mtick[0m
60s Test #77
60s [92mtick[0m
60s Test #78
60s [92mtick[0m
60s Test #79
60s [92mtick[0m
60s Test #80
60s [92mtick[0m
60s Test #81
60s [92mtick[0m
60s Test #82
60s [92mtick[0m
60s Test #83
60s [92mtick[0m
60s Test #84
60s [92mtick[0m
60s Test #85
60s [92mtick[0m
60s Test #86
60s [92mtick[0m
60s [95m[HTML blocks][0m
60s Test #87
60s [92mtick[0m
60s Test #88
60s [92mtick[0m
60s Test #89
60s [92mtick[0m
60s Test #90
60s [92mtick[0m
60s Test #91
60s [92mtick[0m
60s Test #92
60s [92mtick[0m
60s Test #93
60s [91mcross[0m
60s [93m=== markdown ===============
60s [0m
60s [93m
60s === expected ===============
60s [0m
60s
60s Test #94
60s [91mcross[0m
60s [93m=== markdown ===============
60s [0m
60s The␣opening␣tag␣can␣be␣indented␣1-3␣spaces,␣but␣not␣4:
60s
60s [93m
60s === expected ===============
60s [0m␣␣
60s
60s ␣␣␣␣
60s [93m
60s === got ====================
60s [0mThe␣opening␣tag␣can␣be␣indented␣1-3␣spaces,␣but␣not␣4:
60s 60s Test #95 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s An␣HTML␣block␣can␣interrupt␣a␣paragraph,␣and␣need␣not␣be␣preceded 60s by␣a␣blank␣line. 60s 60s [93m 60s === expected =============== 60s [0mFoo 60sAn␣HTML␣block␣can␣interrupt␣a␣paragraph,␣and␣need␣not␣be␣preceded 60s by␣a␣blank␣line.
60s 60s Test #96 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s However,␣a␣following␣blank␣line␣is␣always␣needed,␣except␣at␣the␣end␣of 60s a␣document: 60s 60s [93m 60s === expected =============== 60s [0mHowever,␣a␣following␣blank␣line␣is␣always␣needed,␣except␣at␣the␣end␣of 60s a␣document:
60s 60s Test #97 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s An␣incomplete␣HTML␣block␣tag␣may␣also␣start␣an␣HTML␣block: 60s 60s [93m 60s === expected =============== 60s [0m| 60s Hi 60s | 60s 60s
Some␣Markdown␣implementations␣have␣adopted␣a␣convention␣of
60s interpreting␣content␣inside␣tags␣as␣text␣if␣the␣open␣tag␣has
60s the␣attribute␣markdown=1.␣␣The␣rule␣given␣above␣seems␣a␣simpler␣and
60s more␣elegant␣way␣of␣achieving␣the␣same␣expressive␣power,␣which␣is␣also
60s much␣simpler␣to␣parse.
The␣main␣potential␣drawback␣is␣that␣one␣can␣no␣longer␣paste␣HTML 60s blocks␣into␣Markdown␣documents␣with␣100%␣reliability.␣␣However, 60s in␣most␣cases␣this␣will␣work␣fine,␣because␣the␣blank␣lines␣in 60s HTML␣are␣usually␣followed␣by␣HTML␣block␣tags.␣␣For␣example:
60s 60s Test #101 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Moreover,␣blank␣lines␣are␣usually␣not␣necessary␣and␣can␣be 60s deleted.␣␣The␣exception␣is␣inside␣``␣tags;␣here,␣one␣can 60s replace␣the␣blank␣lines␣with␣` `␣entities. 60s 60s So␣there␣is␣no␣important␣loss␣of␣expressive␣power␣with␣the␣new␣rule. 60s 60s ##␣Link␣reference␣definitions 60s 60s A␣[link␣reference␣definition](#link-reference-definition) 60s ␣consists␣of␣a␣[link 60s label](#link-label),␣indented␣up␣to␣three␣spaces,␣followed 60s by␣a␣colon␣(`:`),␣optional␣blank␣space␣(including␣up␣to␣one 60s newline),␣a␣[link␣destination](#link-destination),␣optional 60s blank␣space␣(including␣up␣to␣one␣newline),␣and␣an␣optional␣[link 60s title](#link-title),␣which␣if␣it␣is␣present␣must␣be␣separated 60s from␣the␣[link␣destination](#link-destination)␣by␣whitespace. 60s No␣further␣non-space␣characters␣may␣occur␣on␣the␣line. 60s 60s A␣[link␣reference-definition](#link-reference-definition) 60s does␣not␣correspond␣to␣a␣structural␣element␣of␣a␣document.␣␣Instead,␣it 60s defines␣a␣label␣which␣can␣be␣used␣in␣[reference␣links](#reference-link) 60s and␣reference-style␣[images](#image)␣elsewhere␣in␣the␣document.␣␣[Link 60s reference␣definitions]␣can␣come␣either␣before␣or␣after␣the␣links␣that␣use 60s them. 60s 60s [93m 60s === expected =============== 60s [0m[foo]:␣/url␣"title" 60s 60s [foo] 60s [93m 60s === got ==================== 60s [0mMoreover,␣blank␣lines␣are␣usually␣not␣necessary␣and␣can␣be 60s deleted.␣␣The␣exception␣is␣inside␣
60s<pre>␣tags;␣here,␣one␣can 60s replace␣the␣blank␣lines␣with␣ ␣entities.So␣there␣is␣no␣important␣loss␣of␣expressive␣power␣with␣the␣new␣rule.
60sLink␣reference␣definitions
60sA␣link␣reference␣definition 60s ␣consists␣of␣a␣link 60s label,␣indented␣up␣to␣three␣spaces,␣followed 60s by␣a␣colon␣(
60s:),␣optional␣blank␣space␣(including␣up␣to␣one 60s newline),␣a␣link␣destination,␣optional 60s blank␣space␣(including␣up␣to␣one␣newline),␣and␣an␣optional␣link 60s title,␣which␣if␣it␣is␣present␣must␣be␣separated 60s from␣the␣link␣destination␣by␣whitespace. 60s No␣further␣non-space␣characters␣may␣occur␣on␣the␣line.A␣link␣reference-definition 60s does␣not␣correspond␣to␣a␣structural␣element␣of␣a␣document.␣␣Instead,␣it 60s defines␣a␣label␣which␣can␣be␣used␣in␣reference␣links 60s and␣reference-style␣images␣elsewhere␣in␣the␣document.␣␣[Link 60s reference␣definitions]␣can␣come␣either␣before␣or␣after␣the␣links␣that␣use 60s them.
60s 60s Test #102 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m␣␣␣[foo]:␣ 60s ␣␣␣␣␣␣/url␣␣ 60s ␣␣␣␣␣␣␣␣␣␣␣'the␣title'␣␣ 60s 60s [foo] 60s [93m 60s === got ==================== 60s [0m 60s Test #103 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m[Foo*bar\]]:my_(url)␣'title␣(with␣parens)' 60s 60s [Foo*bar\]] 60s [93m 60s === got ==================== 60s [0m 60s Test #104 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m[Foo␣bar]: 60s60s 'title' 60s 60s [Foo␣bar] 60s [93m 60s === got ==================== 60s [0m 60s Test #105 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s The␣title␣may␣be␣omitted: 60s 60s [93m 60s === expected =============== 60s [0m[foo]: 60s /url 60s 60s [foo] 60s [93m 60s === got ==================== 60s [0m The␣title␣may␣be␣omitted:
60s 60s Test #106 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s The␣link␣destination␣may␣not␣be␣omitted: 60s 60s [93m 60s === expected =============== 60s [0m[foo]: 60s 60s [foo] 60s [93m 60s === got ==================== 60s [0mThe␣link␣destination␣may␣not␣be␣omitted:
60s 60s Test #107 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s A␣link␣can␣come␣before␣its␣corresponding␣definition: 60s 60s [93m 60s === expected =============== 60s [0m[foo] 60s 60s [foo]:␣url 60s [93m 60s === got ==================== 60s [0mA␣link␣can␣come␣before␣its␣corresponding␣definition:
60s 60s Test #108 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s If␣there␣are␣several␣matching␣definitions,␣the␣first␣one␣takes 60s precedence: 60s 60s [93m 60s === expected =============== 60s [0m[foo] 60s 60s [foo]:␣first 60s [foo]:␣second 60s [93m 60s === got ==================== 60s [0mIf␣there␣are␣several␣matching␣definitions,␣the␣first␣one␣takes 60s precedence:
60s 60s Test #109 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s As␣noted␣in␣the␣section␣on␣[Links],␣matching␣of␣labels␣is 60s case-insensitive␣(see␣[matches](#matches)). 60s 60s [93m 60s === expected =============== 60s [0m[FOO]:␣/url 60s 60s [Foo] 60s [93m 60s === got ==================== 60s [0mAs␣noted␣in␣the␣section␣on␣[Links],␣matching␣of␣labels␣is 60s case-insensitive␣(see␣matches).
60s 60s Test #110 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m[ΑΓΩ]:␣/φου 60s 60s [αγω] 60s [93m 60s === got ==================== 60s [0m 60s Test #111 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Here␣is␣a␣link␣reference␣definition␣with␣no␣corresponding␣link. 60s It␣contributes␣nothing␣to␣the␣document. 60s 60s [93m 60s === expected =============== 60s [0m[foo]:␣/url 60s [93m 60s === got ==================== 60s [0mHere␣is␣a␣link␣reference␣definition␣with␣no␣corresponding␣link. 60s It␣contributes␣nothing␣to␣the␣document.
60s 60s Test #112 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s This␣is␣not␣a␣link␣reference␣definition,␣because␣there␣are 60s non-space␣characters␣after␣the␣title: 60s 60s [93m 60s === expected =============== 60s [0m[foo]:␣/url␣"title"␣ok 60s [93m 60s === got ==================== 60s [0mThis␣is␣not␣a␣link␣reference␣definition,␣because␣there␣are 60s non-space␣characters␣after␣the␣title:
60s 60s Test #113 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s This␣is␣not␣a␣link␣reference␣definition,␣because␣it␣is␣indented 60s four␣spaces: 60s 60s [93m 60s === expected =============== 60s [0m␣␣␣␣[foo]:␣/url␣"title" 60s 60s [foo] 60s [93m 60s === got ==================== 60s [0mThis␣is␣not␣a␣link␣reference␣definition,␣because␣it␣is␣indented 60s four␣spaces:
60s 60s Test #114 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s This␣is␣not␣a␣link␣reference␣definition,␣because␣it␣occurs␣inside 60s a␣code␣block: 60s 60s [93m 60s === expected =============== 60s [0m``` 60s [foo]:␣/url 60s ``` 60s 60s [foo] 60s [93m 60s === got ==================== 60s [0mThis␣is␣not␣a␣link␣reference␣definition,␣because␣it␣occurs␣inside 60s a␣code␣block:
60s 60s Test #115 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s A␣[link␣reference␣definition](#link-reference-definition)␣cannot 60s interrupt␣a␣paragraph. 60s 60s [93m 60s === expected =============== 60s [0mFoo 60s [bar]:␣/baz 60s 60s [bar] 60s [93m 60s === got ==================== 60s [0mA␣link␣reference␣definition␣cannot 60s interrupt␣a␣paragraph.
60s 60s Test #116 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s However,␣it␣can␣directly␣follow␣other␣block␣elements,␣such␣as␣headers 60s and␣horizontal␣rules,␣and␣it␣need␣not␣be␣followed␣by␣a␣blank␣line. 60s 60s [93m 60s === expected =============== 60s [0m#␣[Foo] 60s [foo]:␣/url 60s >␣bar 60s [93m 60s === got ==================== 60s [0mHowever,␣it␣can␣directly␣follow␣other␣block␣elements,␣such␣as␣headers 60s and␣horizontal␣rules,␣and␣it␣need␣not␣be␣followed␣by␣a␣blank␣line.
60s 60s Test #117 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Several␣[link␣references](#link-reference)␣can␣occur␣one␣after␣another, 60s without␣intervening␣blank␣lines. 60s 60s [93m 60s === expected =============== 60s [0m[foo]:␣/foo-url␣"foo" 60s [bar]:␣/bar-url 60s ␣␣"bar" 60s [baz]:␣/baz-url 60s 60s [foo], 60s [bar], 60s [baz] 60s [93m 60s === got ==================== 60s [0mSeveral␣link␣references␣can␣occur␣one␣after␣another, 60s without␣intervening␣blank␣lines.
60s 60s Test #118 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [Link␣reference␣definitions](#link-reference-definition)␣can␣occur 60s inside␣block␣containers,␣like␣lists␣and␣block␣quotations.␣␣They 60s affect␣the␣entire␣document,␣not␣just␣the␣container␣in␣which␣they 60s are␣defined: 60s 60s [93m 60s === expected =============== 60s [0m[foo] 60s 60s >␣[foo]:␣/url 60s [93m 60s === got ==================== 60s [0mLink␣reference␣definitions␣can␣occur 60s inside␣block␣containers,␣like␣lists␣and␣block␣quotations.␣␣They 60s affect␣the␣entire␣document,␣not␣just␣the␣container␣in␣which␣they 60s are␣defined:
60s 60s Test #119 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s 60s ##␣Paragraphs 60s 60s A␣sequence␣of␣non-blank␣lines␣that␣cannot␣be␣interpreted␣as␣other 60s kinds␣of␣blocks␣forms␣a␣[paragraph](#paragraph). 60s The␣contents␣of␣the␣paragraph␣are␣the␣result␣of␣parsing␣the 60s paragraph's␣raw␣content␣as␣inlines.␣␣The␣paragraph's␣raw␣content 60s is␣formed␣by␣concatenating␣the␣lines␣and␣removing␣initial␣and␣final 60s spaces. 60s 60s A␣simple␣example␣with␣two␣paragraphs: 60s 60s [93m 60s === expected =============== 60s [0maaa 60s 60s bbb 60s [93m 60s === got ==================== 60s [0mParagraphs
60sA␣sequence␣of␣non-blank␣lines␣that␣cannot␣be␣interpreted␣as␣other 60s kinds␣of␣blocks␣forms␣a␣paragraph. 60s The␣contents␣of␣the␣paragraph␣are␣the␣result␣of␣parsing␣the 60s paragraph's␣raw␣content␣as␣inlines.␣␣The␣paragraph's␣raw␣content 60s is␣formed␣by␣concatenating␣the␣lines␣and␣removing␣initial␣and␣final 60s spaces.
60sA␣simple␣example␣with␣two␣paragraphs:
60s 60s Test #120 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Paragraphs␣can␣contain␣multiple␣lines,␣but␣no␣blank␣lines: 60s 60s [93m 60s === expected =============== 60s [0maaa 60s bbb 60s 60s ccc 60s ddd 60s [93m 60s === got ==================== 60s [0mParagraphs␣can␣contain␣multiple␣lines,␣but␣no␣blank␣lines:
60s 60s Test #121 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Multiple␣blank␣lines␣between␣paragraph␣have␣no␣effect: 60s 60s [93m 60s === expected =============== 60s [0maaa 60s 60s 60s bbb 60s [93m 60s === got ==================== 60s [0mMultiple␣blank␣lines␣between␣paragraph␣have␣no␣effect:
60s 60s Test #122 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Leading␣spaces␣are␣skipped: 60s 60s [93m 60s === expected =============== 60s [0m␣␣aaa 60s ␣bbb 60s [93m 60s === got ==================== 60s [0mLeading␣spaces␣are␣skipped:
60s 60s Test #123 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Lines␣after␣the␣first␣may␣be␣indented␣any␣amount,␣since␣indented 60s code␣blocks␣cannot␣interrupt␣paragraphs. 60s 60s [93m 60s === expected =============== 60s [0maaa 60s ␣␣␣␣␣␣␣␣␣␣␣␣␣bbb 60s ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ccc 60s [93m 60s === got ==================== 60s [0mLines␣after␣the␣first␣may␣be␣indented␣any␣amount,␣since␣indented 60s code␣blocks␣cannot␣interrupt␣paragraphs.
60s 60s Test #124 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s However,␣the␣first␣line␣may␣be␣indented␣at␣most␣three␣spaces, 60s or␣an␣indented␣code␣block␣will␣be␣triggered: 60s 60s [93m 60s === expected =============== 60s [0m␣␣␣aaa 60s bbb 60s [93m 60s === got ==================== 60s [0mHowever,␣the␣first␣line␣may␣be␣indented␣at␣most␣three␣spaces, 60s or␣an␣indented␣code␣block␣will␣be␣triggered:
60s 60s Test #125 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m␣␣␣␣aaa 60s bbb 60s [93m 60s === got ==================== 60s [0m 60s Test #126 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Final␣spaces␣are␣stripped␣before␣inline␣parsing,␣so␣a␣paragraph 60s that␣ends␣with␣two␣or␣more␣spaces␣will␣not␣end␣with␣a␣hard␣line 60s break: 60s 60s [93m 60s === expected =============== 60s [0maaa␣␣␣␣␣ 60s bbb␣␣␣␣␣ 60s [93m 60s === got ==================== 60s [0mFinal␣spaces␣are␣stripped␣before␣inline␣parsing,␣so␣a␣paragraph 60s that␣ends␣with␣two␣or␣more␣spaces␣will␣not␣end␣with␣a␣hard␣line 60s break:
60s 60s Test #127 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s ##␣Blank␣lines 60s 60s [Blank␣lines](#blank-line)␣between␣block-level␣elements␣are␣ignored, 60s except␣for␣the␣role␣they␣play␣in␣determining␣whether␣a␣[list](#list) 60s is␣[tight](#tight)␣or␣[loose](#loose). 60s 60s Blank␣lines␣at␣the␣beginning␣and␣end␣of␣the␣document␣are␣also␣ignored. 60s 60s [93m 60s === expected =============== 60s [0m␣␣ 60s 60s aaa 60s ␣␣ 60s 60s #␣aaa 60s 60s ␣␣ 60s [93m 60s === got ==================== 60s [0mBlank␣lines
60sBlank␣lines␣between␣block-level␣elements␣are␣ignored, 60s except␣for␣the␣role␣they␣play␣in␣determining␣whether␣a␣list 60s is␣tight␣or␣loose.
60sBlank␣lines␣at␣the␣beginning␣and␣end␣of␣the␣document␣are␣also␣ignored.
60s 60s Test #128 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s 60s #␣Container␣blocks 60s 60s A␣[container␣block](#container-block)␣is␣a␣block␣that␣has␣other 60s blocks␣as␣its␣contents.␣␣There␣are␣two␣basic␣kinds␣of␣container␣blocks: 60s [block␣quotes](#block-quote)␣and␣[list␣items](#list-item). 60s [Lists](#list)␣are␣meta-containers␣for␣[list␣items](#list-item). 60s 60s We␣define␣the␣syntax␣for␣container␣blocks␣recursively.␣␣The␣general 60s form␣of␣the␣definition␣is: 60s 60s >␣If␣X␣is␣a␣sequence␣of␣blocks,␣then␣the␣result␣of 60s >␣transforming␣X␣in␣such-and-such␣a␣way␣is␣a␣container␣of␣type␣Y 60s >␣with␣these␣blocks␣as␣its␣content. 60s 60s So,␣we␣explain␣what␣counts␣as␣a␣block␣quote␣or␣list␣item␣by␣explaining 60s how␣these␣can␣be␣*generated*␣from␣their␣contents.␣This␣should␣suffice 60s to␣define␣the␣syntax,␣although␣it␣does␣not␣give␣a␣recipe␣for␣*parsing* 60s these␣constructions.␣␣(A␣recipe␣is␣provided␣below␣in␣the␣section␣entitled 60s [A␣parsing␣strategy](#appendix-a-a-parsing-strategy).) 60s 60s ##␣Block␣quotes 60s 60s A␣[block␣quote␣marker](#block-quote-marker)␣ 60s consists␣of␣0-3␣spaces␣of␣initial␣indent,␣plus␣(a)␣the␣character␣`>`␣together 60s with␣a␣following␣space,␣or␣(b)␣a␣single␣character␣`>`␣not␣followed␣by␣a␣space. 60s 60s The␣following␣rules␣define␣[block␣quotes](#block-quote): 60s 60s 60s 1.␣␣**Basic␣case.**␣␣If␣a␣string␣of␣lines␣*Ls*␣constitute␣a␣sequence 60s ␣␣␣␣of␣blocks␣*Bs*,␣then␣the␣result␣of␣appending␣a␣[block␣quote 60s ␣␣␣␣marker](#block-quote-marker)␣to␣the␣beginning␣of␣each␣line␣in␣*Ls* 60s ␣␣␣␣is␣a␣[block␣quote](#block-quote)␣containing␣*Bs*. 60s 60s 2.␣␣**Laziness.**␣␣If␣a␣string␣of␣lines␣*Ls*␣constitute␣a␣[block 60s ␣␣␣␣quote](#block-quote)␣with␣contents␣*Bs*,␣then␣the␣result␣of␣deleting 60s ␣␣␣␣the␣initial␣[block␣quote␣marker](#block-quote-marker)␣from␣one␣or 60s ␣␣␣␣more␣lines␣in␣which␣the␣next␣non-space␣character␣after␣the␣[block 60s ␣␣␣␣quote␣marker](#block-quote-marker)␣is␣[paragraph␣continuation 60s ␣␣␣␣text](#paragraph-continuation-text)␣is␣a␣block␣quote␣with␣*Bs*␣as 60s ␣␣␣␣its␣content.␣␣ 60s ␣␣␣␣[Paragraph␣continuation␣text](#paragraph-continuation-text)␣is␣text 60s ␣␣␣␣that␣will␣be␣parsed␣as␣part␣of␣the␣content␣of␣a␣paragraph,␣but␣does 60s ␣␣␣␣not␣occur␣at␣the␣beginning␣of␣the␣paragraph. 60s 60s 3.␣␣**Consecutiveness.**␣␣A␣document␣cannot␣contain␣two␣[block 60s ␣␣␣␣quotes](#block-quote)␣in␣a␣row␣unless␣there␣is␣a␣[blank 60s ␣␣␣␣line](#blank-line)␣between␣them. 60s 60s Nothing␣else␣counts␣as␣a␣[block␣quote](#block-quote). 60s 60s Here␣is␣a␣simple␣example: 60s 60s [93m 60s === expected =============== 60s [0m>␣#␣Foo 60s >␣bar 60s >␣baz 60s [93m 60s === got ==================== 60s [0mContainer␣blocks
60sA␣container␣block␣is␣a␣block␣that␣has␣other 60s blocks␣as␣its␣contents.␣␣There␣are␣two␣basic␣kinds␣of␣container␣blocks: 60s block␣quotes␣and␣list␣items. 60s Lists␣are␣meta-containers␣for␣list␣items.
60sWe␣define␣the␣syntax␣for␣container␣blocks␣recursively.␣␣The␣general 60s form␣of␣the␣definition␣is:
60s60s60sIf␣X␣is␣a␣sequence␣of␣blocks,␣then␣the␣result␣of 60s transforming␣X␣in␣such-and-such␣a␣way␣is␣a␣container␣of␣type␣Y 60s with␣these␣blocks␣as␣its␣content.
60sSo,␣we␣explain␣what␣counts␣as␣a␣block␣quote␣or␣list␣item␣by␣explaining 60s how␣these␣can␣be␣generated␣from␣their␣contents.␣This␣should␣suffice 60s to␣define␣the␣syntax,␣although␣it␣does␣not␣give␣a␣recipe␣for␣parsing 60s these␣constructions.␣␣(A␣recipe␣is␣provided␣below␣in␣the␣section␣entitled 60s A␣parsing␣strategy.)
60sBlock␣quotes
60sA␣block␣quote␣marker␣ 60s consists␣of␣0-3␣spaces␣of␣initial␣indent,␣plus␣(a)␣the␣character␣
60s>␣together 60s with␣a␣following␣space,␣or␣(b)␣a␣single␣character␣>␣not␣followed␣by␣a␣space.The␣following␣rules␣define␣block␣quotes: 60s
60s60s
60s- 60s
Basic␣case.␣␣If␣a␣string␣of␣lines␣Ls␣constitute␣a␣sequence 60s of␣blocks␣Bs,␣then␣the␣result␣of␣appending␣a␣block␣quote 60s marker␣to␣the␣beginning␣of␣each␣line␣in␣Ls 60s is␣a␣block␣quote␣containing␣Bs.
- 60s
Laziness.␣␣If␣a␣string␣of␣lines␣Ls␣constitute␣a␣block 60s quote␣with␣contents␣Bs,␣then␣the␣result␣of␣deleting 60s the␣initial␣block␣quote␣marker␣from␣one␣or 60s more␣lines␣in␣which␣the␣next␣non-space␣character␣after␣the␣block 60s quote␣marker␣is␣paragraph␣continuation 60s text␣is␣a␣block␣quote␣with␣Bs␣as 60s its␣content.␣␣ 60s Paragraph␣continuation␣text␣is␣text 60s that␣will␣be␣parsed␣as␣part␣of␣the␣content␣of␣a␣paragraph,␣but␣does 60s not␣occur␣at␣the␣beginning␣of␣the␣paragraph.
- 60s
Consecutiveness.␣␣A␣document␣cannot␣contain␣two␣block 60s quotes␣in␣a␣row␣unless␣there␣is␣a␣blank 60s line␣between␣them.
Nothing␣else␣counts␣as␣a␣block␣quote.
60sHere␣is␣a␣simple␣example:
60s 60s Test #129 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s The␣spaces␣after␣the␣`>`␣characters␣can␣be␣omitted: 60s 60s [93m 60s === expected =============== 60s [0m>#␣Foo 60s >bar 60s >␣baz 60s [93m 60s === got ==================== 60s [0mThe␣spaces␣after␣the␣
60s 60s Test #130 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s The␣`>`␣characters␣can␣be␣indented␣1-3␣spaces: 60s 60s [93m 60s === expected =============== 60s [0m␣␣␣>␣#␣Foo 60s ␣␣␣>␣bar 60s ␣>␣baz 60s [93m 60s === got ==================== 60s [0m>␣characters␣can␣be␣omitted:The␣
60s 60s Test #131 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Four␣spaces␣gives␣us␣a␣code␣block: 60s 60s [93m 60s === expected =============== 60s [0m␣␣␣␣>␣#␣Foo 60s ␣␣␣␣>␣bar 60s ␣␣␣␣>␣baz 60s [93m 60s === got ==================== 60s [0m>␣characters␣can␣be␣indented␣1-3␣spaces:Four␣spaces␣gives␣us␣a␣code␣block:
60s 60s Test #132 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s The␣Laziness␣clause␣allows␣us␣to␣omit␣the␣`>`␣before␣a 60s paragraph␣continuation␣line: 60s 60s [93m 60s === expected =============== 60s [0m>␣#␣Foo 60s >␣bar 60s baz 60s [93m 60s === got ==================== 60s [0mThe␣Laziness␣clause␣allows␣us␣to␣omit␣the␣
60s 60s Test #133 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s A␣block␣quote␣can␣contain␣some␣lazy␣and␣some␣non-lazy 60s continuation␣lines: 60s 60s [93m 60s === expected =============== 60s [0m>␣bar 60s baz 60s >␣foo 60s [93m 60s === got ==================== 60s [0m>␣before␣a 60s paragraph␣continuation␣line:A␣block␣quote␣can␣contain␣some␣lazy␣and␣some␣non-lazy 60s continuation␣lines:
60s 60s Test #134 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s Laziness␣only␣applies␣to␣lines␣that␣are␣continuations␣of 60s paragraphs.␣Lines␣containing␣characters␣or␣indentation␣that␣indicate 60s block␣structure␣cannot␣be␣lazy. 60s 60s [93m 60s === expected =============== 60s [0m>␣foo 60s --- 60s [93m 60s === got ==================== 60s [0mLaziness␣only␣applies␣to␣lines␣that␣are␣continuations␣of 60s paragraphs.␣Lines␣containing␣characters␣or␣indentation␣that␣indicate 60s block␣structure␣cannot␣be␣lazy.
60s 60s Test #135 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m>␣-␣foo 60s -␣bar 60s [93m 60s === got ==================== 60s [0m 60s Test #136 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m>␣␣␣␣␣foo 60s ␣␣␣␣bar 60s [93m 60s === got ==================== 60s [0m 60s Test #137 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s [93m 60s === expected =============== 60s [0m>␣``` 60s foo 60s ``` 60s [93m 60s === got ==================== 60s [0m 60s Test #138 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m 60s A␣block␣quote␣can␣be␣empty: 60s 60s [93m 60s === expected =============== 60s [0m[93m 60s === got ==================== 60s [0mA␣block␣quote␣can␣be␣empty:
60s 60s Test #139 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m60s60s 60s Test #140 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s [93m 60s === expected =============== 60s [0m 60s A␣block␣quote␣can␣have␣initial␣or␣final␣blank␣lines: 60s 60s [93m 60s === got ==================== 60s [0m60s60s 60s Test #141 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s [93m 60s === expected =============== 60s [0m 60s A␣blank␣line␣always␣separates␣block␣quotes: 60s 60s [93m 60s === got ==================== 60s [0mfoo
60s60s60s 60s Test #142 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mfoo
60s60s60sfoo
60s60s60s [93m 60s === expected =============== 60s [0m 60s (Most␣current␣Markdown␣implementations,␣including␣John␣Gruber's 60s original␣`Markdown.pl`,␣will␣parse␣this␣example␣as␣a␣single␣block␣quote 60s with␣two␣paragraphs.␣␣But␣it␣seems␣better␣to␣allow␣the␣author␣to␣decide 60s whether␣two␣block␣quotes␣or␣one␣are␣wanted.) 60s 60s Consecutiveness␣means␣that␣if␣we␣put␣these␣block␣quotes␣together, 60s we␣get␣a␣single␣block␣quote: 60s 60s [93m 60s === got ==================== 60s [0mbar
60s60s60sfoo
60s60s60s 60s Test #143 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mbar
60s60s60s [93m 60s === expected =============== 60s [0m 60s To␣get␣a␣block␣quote␣with␣two␣paragraphs,␣use: 60s 60s [93m 60s === got ==================== 60s [0mfoo 60s bar
60s60s60s 60s Test #144 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mfoo 60s bar
60s60s60s [93m 60s === expected =============== 60s [0m 60s Block␣quotes␣can␣interrupt␣paragraphs: 60s 60s [93m 60s === got ==================== 60s [0mfoo
60sbar
60s60s60s 60s Test #145 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mfoo
60sbar
60sfoo
60s60s60s [93m 60s === expected =============== 60s [0m 60s In␣general,␣blank␣lines␣are␣not␣needed␣before␣or␣after␣block 60s quotes: 60s 60s [93m 60s === got ==================== 60s [0mbar
60sfoo
60s60s60s 60s Test #146 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mbar
60s60s60saaa
60s
60s60s60s [93m 60s === expected =============== 60s [0m 60s However,␣because␣of␣laziness,␣a␣blank␣line␣is␣needed␣between 60s a␣block␣quote␣and␣a␣following␣paragraph: 60s 60s [93m 60s === got ==================== 60s [0mbbb
60s60s60saaa
60s
60s60s60s 60s Test #147 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mbbb
60s60s60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0mbar 60s baz
60s60s60s 60s Test #148 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mbar 60s baz
60s60s60sbar
60sbaz
60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m60s60sbar
60sbaz
60s 60s Test #149 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60sbar
60sbaz
60s [93m 60s === expected =============== 60s [0m 60s It␣is␣a␣consequence␣of␣the␣Laziness␣rule␣that␣any␣number 60s of␣initial␣`>`s␣may␣be␣omitted␣on␣a␣continuation␣line␣of␣a 60s nested␣block␣quote: 60s 60s [93m 60s === got ==================== 60s [0m60s60sbar
60sbaz
60s 60s Test #150 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m60s60s60s60sfoo 60s bar
60s60s60s 60s Test #151 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s60s60sfoo 60s bar
60s60s60s [93m 60s === expected =============== 60s [0m 60s When␣including␣an␣indented␣code␣block␣in␣a␣block␣quote, 60s remember␣that␣the␣[block␣quote␣marker](#block-quote-marker)␣includes 60s both␣the␣`>`␣and␣a␣following␣space.␣␣So␣*five␣spaces*␣are␣needed␣after 60s the␣`>`: 60s 60s [93m 60s === got ==================== 60s [0m60s60s60s60sfoo 60s bar 60s baz
60s60s60s 60s Test #152 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s60s60sfoo 60s bar 60s baz
60s60s60s60scode 60s60s60s [93m 60s === expected =============== 60s [0m 60s 60s ##␣List␣items 60s 60s A␣[list␣marker](#list-marker)␣␣is␣a 60s [bullet␣list␣marker](#bullet-list-marker)␣or␣an␣[ordered␣list 60s marker](#ordered-list-marker). 60s 60s A␣[bullet␣list␣marker](#bullet-list-marker)␣ 60s is␣a␣`-`,␣`+`,␣or␣`*`␣character. 60s 60s An␣[ordered␣list␣marker](#ordered-list-marker)␣ 60s is␣a␣sequence␣of␣one␣of␣more␣digits␣(`0-9`),␣followed␣by␣either␣a 60s `.`␣character␣or␣a␣`)`␣character. 60s 60s The␣following␣rules␣define␣[list␣items](#list-item): 60s 60s 1.␣␣**Basic␣case.**␣␣If␣a␣sequence␣of␣lines␣*Ls*␣constitute␣a␣sequence␣of 60s ␣␣␣␣blocks␣*Bs*␣starting␣with␣a␣non-space␣character␣and␣not␣separated 60s ␣␣␣␣from␣each␣other␣by␣more␣than␣one␣blank␣line,␣and␣*M*␣is␣a␣list 60s ␣␣␣␣marker␣*M*␣of␣width␣*W*␣followed␣by␣0␣<␣*N*␣<␣5␣spaces,␣then␣the␣result 60s ␣␣␣␣of␣prepending␣*M*␣and␣the␣following␣spaces␣to␣the␣first␣line␣of 60s ␣␣␣␣*Ls*,␣and␣indenting␣subsequent␣lines␣of␣*Ls*␣by␣*W␣+␣N*␣spaces,␣is␣a 60s ␣␣␣␣list␣item␣with␣*Bs*␣as␣its␣contents.␣␣The␣type␣of␣the␣list␣item 60s ␣␣␣␣(bullet␣or␣ordered)␣is␣determined␣by␣the␣type␣of␣its␣list␣marker. 60s ␣␣␣␣If␣the␣list␣item␣is␣ordered,␣then␣it␣is␣also␣assigned␣a␣start 60s ␣␣␣␣number,␣based␣on␣the␣ordered␣list␣marker. 60s 60s For␣example,␣let␣*Ls*␣be␣the␣lines 60s 60s [93m 60s === got ==================== 60s [0mnot␣code
60s60s60s60scode 60s60s60s 60s Test #153 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mnot␣code
60sA␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60s60s [93m 60s === expected =============== 60s [0m 60s And␣let␣*M*␣be␣the␣marker␣`1.`,␣and␣*N*␣=␣2.␣␣Then␣rule␣#1␣says 60s that␣the␣following␣is␣an␣ordered␣list␣item␣with␣start␣number␣1, 60s and␣the␣same␣contents␣as␣*Ls*: 60s 60s [93m 60s === got ==================== 60s [0mA␣block␣quote.
60sA␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60s60s 60s Test #154 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mA␣block␣quote.
60s60s
60s [93m 60s === expected =============== 60s [0m 60s The␣most␣important␣thing␣to␣notice␣is␣that␣the␣position␣of 60s the␣text␣after␣the␣list␣marker␣determines␣how␣much␣indentation 60s is␣needed␣in␣subsequent␣blocks␣in␣the␣list␣item.␣␣If␣the␣list 60s marker␣takes␣up␣two␣spaces,␣and␣there␣are␣three␣spaces␣between 60s the␣list␣marker␣and␣the␣next␣nonspace␣character,␣then␣blocks 60s must␣be␣indented␣five␣spaces␣in␣order␣to␣fall␣under␣the␣list 60s item. 60s 60s Here␣are␣some␣examples␣showing␣how␣far␣content␣must␣be␣indented␣to␣be 60s put␣under␣the␣list␣item: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s 60s Test #155 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s- one
60stwo
60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m60s
60s- one
60stwo
60s 60s Test #156 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s
60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m- 60s
one
60stwo
60s
60s 60s Test #157 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
one
60stwo
60s
60s- one
60s60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m␣two 60s60s
60s- one
60s60s 60s Test #158 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m␣two 60s60s
60s [93m 60s === expected =============== 60s [0m 60s It␣is␣tempting␣to␣think␣of␣this␣in␣terms␣of␣columns:␣␣the␣continuation 60s blocks␣must␣be␣indented␣at␣least␣to␣the␣column␣of␣the␣first␣nonspace 60s character␣after␣the␣list␣marker.␣␣However,␣that␣is␣not␣quite␣right. 60s The␣spaces␣after␣the␣list␣marker␣determine␣how␣much␣relative␣indentation 60s is␣needed.␣␣Which␣column␣this␣indentation␣reaches␣will␣depend␣on 60s how␣the␣list␣item␣is␣embedded␣in␣other␣constructions,␣as␣shown␣by 60s this␣example: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
one
60stwo
60s
60s 60s Test #159 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
one
60stwo
60s60s [93m 60s === expected =============== 60s [0m 60s Here␣`two`␣occurs␣in␣the␣same␣column␣as␣the␣list␣marker␣`1.`, 60s but␣is␣actually␣contained␣in␣the␣list␣item,␣because␣there␣is 60s sufficent␣indentation␣after␣the␣last␣containing␣blockquote␣marker. 60s 60s The␣converse␣is␣also␣possible.␣␣In␣the␣following␣example,␣the␣word␣`two` 60s occurs␣far␣to␣the␣right␣of␣the␣initial␣text␣of␣the␣list␣item,␣`one`,␣but 60s it␣is␣not␣considered␣part␣of␣the␣list␣item,␣because␣it␣is␣not␣indented 60s far␣enough␣past␣the␣blockquote␣marker: 60s 60s [93m 60s === got ==================== 60s [0m60s60s60s
60s- 60s
one
60stwo
60s60s 60s Test #160 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s60s
60s- 60s
one
60stwo
60s60s [93m 60s === expected =============== 60s [0m 60s A␣list␣item␣may␣not␣contain␣blocks␣that␣are␣separated␣by␣more␣than 60s one␣blank␣line.␣␣Thus,␣two␣blank␣lines␣will␣end␣a␣list,␣unless␣the 60s two␣blanks␣are␣contained␣in␣a␣[fenced␣code␣block](#fenced-code-block). 60s 60s [93m 60s === got ==================== 60s [0m60s60s60s
60s- one
60stwo
60s60s60s 60s Test #161 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s60s60s
60s- one
60stwo
60s60s
60s- 60s
foo
60sbar
- 60s
foo
bar
60s60s
60s [93m 60s === expected =============== 60s [0m 60s A␣list␣item␣may␣contain␣any␣kind␣of␣block: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
foo 60s 60s 60s bar 60s60s
60s- 60s
foo
60sbar
- 60s
foo
bar
60s60s
60s 60s Test #162 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
foo 60sbar 60s
60s
60s [93m 60s === expected =============== 60s [0m 60s 2.␣␣**Item␣starting␣with␣indented␣code.**␣␣If␣a␣sequence␣of␣lines␣*Ls* 60s ␣␣␣␣constitute␣a␣sequence␣of␣blocks␣*Bs*␣starting␣with␣an␣indented␣code 60s ␣␣␣␣block␣and␣not␣separated␣from␣each␣other␣by␣more␣than␣one␣blank␣line, 60s ␣␣␣␣and␣*M*␣is␣a␣list␣marker␣*M*␣of␣width␣*W*␣followed␣by 60s ␣␣␣␣one␣space,␣then␣the␣result␣of␣prepending␣*M*␣and␣the␣following 60s ␣␣␣␣space␣to␣the␣first␣line␣of␣*Ls*,␣and␣indenting␣subsequent␣lines␣of 60s ␣␣␣␣*Ls*␣by␣*W␣+␣1*␣spaces,␣is␣a␣list␣item␣with␣*Bs*␣as␣its␣contents. 60s ␣␣␣␣If␣a␣line␣is␣empty,␣then␣it␣need␣not␣be␣indented.␣␣The␣type␣of␣the 60s ␣␣␣␣list␣item␣(bullet␣or␣ordered)␣is␣determined␣by␣the␣type␣of␣its␣list 60s ␣␣␣␣marker.␣␣If␣the␣list␣item␣is␣ordered,␣then␣it␣is␣also␣assigned␣a 60s ␣␣␣␣start␣number,␣based␣on␣the␣ordered␣list␣marker. 60s 60s An␣indented␣code␣block␣will␣have␣to␣be␣indented␣four␣spaces␣beyond 60s the␣edge␣of␣the␣region␣where␣text␣will␣be␣included␣in␣the␣list␣item. 60s In␣the␣following␣case␣that␣is␣6␣spaces: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
foo
60s60sbar 60sbaz
60s60sbam
60s60s
60s 60s Test #163 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
foo
60s60sbar 60sbaz
60s60sbam
60s60s
60s [93m 60s === expected =============== 60s [0m 60s And␣in␣this␣case␣it␣is␣11␣spaces: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
foo
60sbar 60s60s
60s 60s Test #164 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
foo
60sbar 60s60s
60s [93m 60s === expected =============== 60s [0m 60s If␣the␣*first*␣block␣in␣the␣list␣item␣is␣an␣indented␣code␣block, 60s then␣by␣rule␣#2,␣the␣contents␣must␣be␣indented␣*one*␣space␣after␣the 60s list␣marker: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
foo
60sbar 60s60s
60s 60s Test #165 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
foo
60sbar 60s60sindented␣code 60sparagraph
60s60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0mmore␣code 60s60sindented␣code 60sparagraph
60s60s 60s Test #166 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0mmore␣code 60s60s
60s [93m 60s === expected =============== 60s [0m 60s Note␣that␣an␣additional␣space␣indent␣is␣interpreted␣as␣space 60s inside␣the␣code␣block: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
60sindented␣code 60sparagraph
60smore␣code 60s60s
60s 60s Test #167 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
60sindented␣code 60sparagraph
60smore␣code 60s60s
60s [93m 60s === expected =============== 60s [0m 60s Note␣that␣rules␣#1␣and␣#2␣only␣apply␣to␣two␣cases:␣␣(a)␣cases 60s in␣which␣the␣lines␣to␣be␣included␣in␣a␣list␣item␣begin␣with␣a␣nonspace 60s character,␣and␣(b)␣cases␣in␣which␣they␣begin␣with␣an␣indented␣code 60s block.␣␣In␣a␣case␣like␣the␣following,␣where␣the␣first␣block␣begins␣with 60s a␣three-space␣indent,␣the␣rules␣do␣not␣allow␣us␣to␣form␣a␣list␣item␣by 60s indenting␣the␣whole␣thing␣and␣prepending␣a␣list␣marker: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
60s␣indented␣code 60sparagraph
60smore␣code 60s60s
60s 60s Test #168 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
60s␣indented␣code 60sparagraph
60smore␣code 60sfoo
60sbar
60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0mfoo
60sbar
60s 60s Test #169 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s
60s- foo
60sbar
60s [93m 60s === expected =============== 60s [0m 60s This␣is␣not␣a␣significant␣restriction,␣because␣when␣a␣block␣begins 60s with␣1-3␣spaces␣indent,␣the␣indentation␣can␣always␣be␣removed␣without 60s a␣change␣in␣interpretation,␣allowing␣rule␣#1␣to␣be␣applied.␣␣So,␣in 60s the␣above␣case: 60s 60s [93m 60s === got ==================== 60s [0m60s
60s- foo
60sbar
60s 60s Test #170 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s
60s [93m 60s === expected =============== 60s [0m 60s 60s 3.␣␣**Indentation.**␣␣If␣a␣sequence␣of␣lines␣*Ls*␣constitutes␣a␣list␣item 60s ␣␣␣␣according␣to␣rule␣#1␣or␣#2,␣then␣the␣result␣of␣indenting␣each␣line 60s ␣␣␣␣of␣*L*␣by␣1-3␣spaces␣(the␣same␣for␣each␣line)␣also␣constitutes␣a 60s ␣␣␣␣list␣item␣with␣the␣same␣contents␣and␣attributes.␣␣If␣a␣line␣is 60s ␣␣␣␣empty,␣then␣it␣need␣not␣be␣indented. 60s 60s Indented␣one␣space: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
foo
60sbar
60s
60s 60s Test #171 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
foo
60sbar
60s
60s [93m 60s === expected =============== 60s [0m 60s Indented␣two␣spaces: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s 60s Test #172 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s [93m 60s === expected =============== 60s [0m 60s Indented␣three␣spaces: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s 60s Test #173 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s [93m 60s === expected =============== 60s [0m 60s Four␣spaces␣indent␣gives␣a␣code␣block: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s 60s Test #174 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s [93m 60s === expected =============== 60s [0m 60s 60s 4.␣␣**Laziness.**␣␣If␣a␣string␣of␣lines␣*Ls*␣constitute␣a␣[list 60s ␣␣␣␣item](#list-item)␣with␣contents␣*Bs*,␣then␣the␣result␣of␣deleting 60s ␣␣␣␣some␣or␣all␣of␣the␣indentation␣from␣one␣or␣more␣lines␣in␣which␣the 60s ␣␣␣␣next␣non-space␣character␣after␣the␣indentation␣is 60s ␣␣␣␣[paragraph␣continuation␣text](#paragraph-continuation-text)␣is␣a 60s ␣␣␣␣list␣item␣with␣the␣same␣contents␣and␣attributes. 60s 60s Here␣is␣an␣example␣with␣lazy␣continuation␣lines: 60s 60s [93m 60s === got ==================== 60s [0m1.␣␣A␣paragraph 60s ␣␣␣␣with␣two␣lines. 60s 60s ␣␣␣␣␣␣␣␣indented␣code 60s 60s ␣␣␣␣>␣A␣block␣quote. 60s60s 60s Test #175 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m1.␣␣A␣paragraph 60s ␣␣␣␣with␣two␣lines. 60s60s␣␣␣␣indented␣code 60s 60s >␣A␣block␣quote. 60s60s
60s [93m 60s === expected =============== 60s [0m 60s Indentation␣can␣be␣partially␣deleted: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s 60s Test #176 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
A␣paragraph 60s with␣two␣lines.
60s60sindented␣code 60s60sA␣block␣quote.
60s60s
60s [93m 60s === expected =============== 60s [0m 60s These␣examples␣show␣how␣laziness␣can␣work␣in␣nested␣structures: 60s 60s [93m 60s === got ==================== 60s [0m- A␣paragraph 60s with␣two␣lines.
60s60s
60s 60s Test #177 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- A␣paragraph 60s with␣two␣lines.
60s60s60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m60s
60s- 60s
60sBlockquote 60s continued␣here.
60s60s60s 60s Test #178 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s
60s- 60s
60sBlockquote 60s continued␣here.
60s60s60s [93m 60s === expected =============== 60s [0m 60s 60s 5.␣␣**That's␣all.**␣Nothing␣that␣is␣not␣counted␣as␣a␣list␣item␣by␣rules 60s ␣␣␣␣#1--4␣counts␣as␣a␣[list␣item](#list-item). 60s 60s The␣rules␣for␣sublists␣follow␣from␣the␣general␣rules␣above.␣␣A␣sublist 60s must␣be␣indented␣the␣same␣number␣of␣spaces␣a␣paragraph␣would␣need␣to␣be 60s in␣order␣to␣be␣included␣in␣the␣list␣item. 60s 60s So,␣in␣this␣case␣we␣need␣two␣spaces␣indent: 60s 60s [93m 60s === got ==================== 60s [0m60s
60s- 60s
60sBlockquote 60s continued␣here.
60s60s60s 60s Test #179 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m60s
60s- 60s
60sBlockquote 60s continued␣here.
60s60s
60s [93m 60s === expected =============== 60s [0m 60s One␣is␣not␣enough: 60s 60s [93m 60s === got ==================== 60s [0m- foo 60s
60s60s
- bar 60s
60s60s
- baz
60s60s
60s 60s Test #180 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- foo 60s
60s60s
- bar 60s
60s60s
- baz
60s60s
60s [93m 60s === expected =============== 60s [0m 60s Here␣we␣need␣four,␣because␣the␣list␣marker␣is␣wider: 60s 60s [93m 60s === got ==================== 60s [0m- foo
60s- bar
60s- baz
60s60s
60s 60s Test #181 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- foo
60s- bar
60s- baz
60s60s
60s [93m 60s === expected =============== 60s [0m 60s Three␣is␣not␣enough: 60s 60s [93m 60s === got ==================== 60s [0m- foo 60s
60s60s
- bar
60s60s
60s 60s Test #182 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- foo 60s
60s60s
- bar
60s60s
60s- foo
60s60s
60s [93m 60s === expected =============== 60s [0m 60s A␣list␣may␣be␣the␣first␣block␣in␣a␣list␣item: 60s 60s [93m 60s === got ==================== 60s [0m- bar
60s60s
60s- foo
60s60s
60s 60s Test #183 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- bar
60s60s
60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m- 60s
60s
- foo
60s60s
60s 60s Test #184 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
60s
- foo
60s60s
60s [93m 60s === expected =============== 60s [0m 60s A␣list␣item␣may␣be␣empty: 60s 60s [93m 60s === got ==================== 60s [0m- 60s
60s
- 60s
60s
- foo
60s60s
60s 60s Test #185 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- 60s
60s
- 60s
60s
- foo
60s60s
60s [93m 60s === expected =============== 60s [0m 60s [93m 60s === got ==================== 60s [0m- foo
60s 60s- bar
60s60s
60s 60s Test #186 60s [91mcross[0m 60s [93m=== markdown =============== 60s [0m- foo
60s 60s- bar
60s60s 60s
60s [93m 60s === expected =============== 60s [0m 60s ###␣Motivation 60s 60s John␣Gruber's␣Markdown␣spec␣says␣the␣following␣about␣list␣items: 60s 60s 1.␣"List␣markers␣typically␣start␣at␣the␣left␣margin,␣but␣may␣be␣indented 60s ␣␣␣by␣up␣to␣three␣spaces.␣List␣markers␣must␣be␣followed␣by␣one␣or␣more 60s ␣␣␣spaces␣or␣a␣tab." 60s 60s 2.␣"To␣make␣lists␣look␣nice,␣you␣can␣wrap␣items␣with␣hanging␣indents.... 60s ␣␣␣But␣if␣you␣don't␣want␣to,␣you␣don't␣have␣to." 60s 60s 3.␣"List␣items␣may␣consist␣of␣multiple␣paragraphs.␣Each␣subsequent 60s ␣␣␣paragraph␣in␣a␣list␣item␣must␣be␣indented␣by␣either␣4␣spaces␣or␣one 60s ␣␣␣tab." 60s 60s 4.␣"It␣looks␣nice␣if␣you␣indent␣every␣line␣of␣the␣subsequent␣paragraphs, 60s ␣␣␣but␣here␣again,␣Markdown␣will␣allow␣you␣to␣be␣lazy." 60s 60s 5.␣"To␣put␣a␣blockquote␣within␣a␣list␣item,␣the␣blockquote's␣`>` 60s ␣␣␣delimiters␣need␣to␣be␣indented." 60s 60s 6.␣"To␣put␣a␣code␣block␣within␣a␣list␣item,␣the␣code␣block␣needs␣to␣be 60s ␣␣␣indented␣twice␣—␣8␣spaces␣or␣two␣tabs." 60s 60s These␣rules␣specify␣that␣a␣paragraph␣under␣a␣list␣item␣must␣be␣indented 60s four␣spaces␣(presumably,␣from␣the␣left␣margin,␣rather␣than␣the␣start␣of 60s the␣list␣marker,␣but␣this␣is␣not␣said),␣and␣that␣code␣under␣a␣list␣item 60s must␣be␣indented␣eight␣spaces␣instead␣of␣the␣usual␣four.␣␣They␣also␣say 60s that␣a␣block␣quote␣must␣be␣indented,␣but␣not␣by␣how␣much;␣however,␣the 60s example␣given␣has␣four␣spaces␣indentation.␣␣Although␣nothing␣is␣said 60s about␣other␣kinds␣of␣block-level␣content,␣it␣is␣certainly␣reasonable␣to 60s infer␣that␣*all*␣block␣elements␣under␣a␣list␣item,␣including␣other 60s lists,␣must␣be␣indented␣four␣spaces.␣␣This␣principle␣has␣been␣called␣the 60s *four-space␣rule*. 60s 60s The␣four-space␣rule␣is␣clear␣and␣principled,␣and␣if␣the␣reference 60s implementation␣`Markdown.pl`␣had␣followed␣it,␣it␣probably␣would␣have 60s become␣the␣standard.␣␣However,␣`Markdown.pl`␣allowed␣paragraphs␣and 60s sublists␣to␣start␣with␣only␣two␣spaces␣indentation,␣at␣least␣on␣the 60s outer␣level.␣␣Worse,␣its␣behavior␣was␣inconsistent:␣a␣sublist␣of␣an 60s outer-level␣list␣needed␣two␣spaces␣indentation,␣but␣a␣sublist␣of␣this 60s sublist␣needed␣three␣spaces.␣␣It␣is␣not␣surprising,␣then,␣that␣different 60s implementations␣of␣Markdown␣have␣developed␣very␣different␣rules␣for 60s determining␣what␣comes␣under␣a␣list␣item.␣␣(Pandoc␣and␣python-Markdown, 60s for␣example,␣stuck␣with␣Gruber's␣syntax␣description␣and␣the␣four-space 60s rule,␣while␣discount,␣redcarpet,␣marked,␣PHP␣Markdown,␣and␣others 60s followed␣`Markdown.pl`'s␣behavior␣more␣closely.) 60s 60s Unfortunately,␣given␣the␣divergences␣between␣implementations,␣there 60s is␣no␣way␣to␣give␣a␣spec␣for␣list␣items␣that␣will␣be␣guaranteed␣not 60s to␣break␣any␣existing␣documents.␣␣However,␣the␣spec␣given␣here␣should 60s correctly␣handle␣lists␣formatted␣with␣either␣the␣four-space␣rule␣or 60s the␣more␣forgiving␣`Markdown.pl`␣behavior,␣provided␣they␣are␣laid␣out 60s in␣a␣way␣that␣is␣natural␣for␣a␣human␣to␣read. 60s 60s The␣strategy␣here␣is␣to␣let␣the␣width␣and␣indentation␣of␣the␣list␣marker 60s determine␣the␣indentation␣necessary␣for␣blocks␣to␣fall␣under␣the␣list 60s item,␣rather␣than␣having␣a␣fixed␣and␣arbitrary␣number.␣␣The␣writer␣can 60s think␣of␣the␣body␣of␣the␣list␣item␣as␣a␣unit␣which␣gets␣indented␣to␣the 60s right␣enough␣to␣fit␣the␣list␣marker␣(and␣any␣indentation␣on␣the␣list 60s marker).␣␣(The␣laziness␣rule,␣#4,␣then␣allows␣continuation␣lines␣to␣be 60s unindented␣if␣needed.) 60s 60s This␣rule␣is␣superior,␣we␣claim,␣to␣any␣rule␣requiring␣a␣fixed␣level␣of 60s indentation␣from␣the␣margin.␣␣The␣four-space␣rule␣is␣clear␣but 60s unnatural.␣It␣is␣quite␣unintuitive␣that 60s 60s ```␣markdown 60s -␣foo 60s 60s ␣␣bar 60s 60s ␣␣-␣baz 60s ``` 60s 60s should␣be␣parsed␣as␣two␣lists␣with␣an␣intervening␣paragraph, 60s 60s ```␣html 60s60s
60s- foo
60sbar
60s60s
60s ``` 60s 60s as␣the␣four-space␣rule␣demands,␣rather␣than␣a␣single␣list, 60s 60s ```␣html 60s- baz
60s60s
60s ``` 60s 60s The␣choice␣of␣four␣spaces␣is␣arbitrary.␣␣It␣can␣be␣learned,␣but␣it␣is 60s not␣likely␣to␣be␣guessed,␣and␣it␣trips␣up␣beginners␣regularly. 60s 60s Would␣it␣help␣to␣adopt␣a␣two-space␣rule?␣␣The␣problem␣is␣that␣such 60s a␣rule,␣together␣with␣the␣rule␣allowing␣1--3␣spaces␣indentation␣of␣the 60s initial␣list␣marker,␣allows␣text␣that␣is␣indented␣*less␣than*␣the 60s original␣list␣marker␣to␣be␣included␣in␣the␣list␣item.␣For␣example, 60s `Markdown.pl`␣parses 60s 60s ```␣markdown 60s ␣␣␣-␣one 60s 60s ␣␣two 60s ``` 60s 60s as␣a␣single␣list␣item,␣with␣`two`␣a␣continuation␣paragraph: 60s 60s ```␣html 60s- 60s
foo
60sbar
60s60s
- baz
60s60s
60s ``` 60s 60s and␣similarly 60s 60s ```␣markdown 60s >␣␣␣-␣one 60s [93m 60s === got ==================== 60s [0m- 60s
one
60stwo
60s 60s
60s 60s [95m[Lists][0m 60s Test #187 60s [92mtick[0m 60s Test #188 60s [92mtick[0m 60s Test #189 60s [92mtick[0m 60s Test #190 60s [92mtick[0m 60s Test #191 60s [92mtick[0m 60s Test #192 60s [92mtick[0m 60s Test #193 60s [92mtick[0m 60s Test #194 60s [92mtick[0m 60s Test #195 60s [92mtick[0m 60s Test #196 60s [92mtick[0m 60s Test #197 60s [92mtick[0m 60s Test #198 60s [92mtick[0m 60s Test #199 60s [92mtick[0m 60s Test #200 60s [92mtick[0m 60s Test #201 60s [92mtick[0m 60s Test #202 60s [92mtick[0m 60s Test #203 60s [92mtick[0m 60s Test #204 60s [92mtick[0m 60s Test #205 60s [92mtick[0m 60s Test #206 60s [92mtick[0m 60s [95m[Inlines][0m 60s Test #207 60s [92mtick[0m 60s [95m[Backslash escapes][0m 60s Test #208 60s [92mtick[0m 60s Test #209 60s [92mtick[0m 60s Test #210 60s [92mtick[0m 60s Test #211 60s [92mtick[0m 60s Test #212 60s [92mtick[0m 60s Test #213 60s [92mtick[0m 60s Test #214 60s [92mtick[0m 60s Test #215 60s [92mtick[0m 60s Test #216 60s [92mtick[0m 60s Test #217 60s [92mtick[0m 60s Test #218 60s [92mtick[0m 60s Test #219 60s [92mtick[0m 60s Test #220 60s [92mtick[0m 60s [95m[Entities][0m 60s Test #221 60s [92mtick[0m 60s Test #222 60s [92mtick[0m 60s Test #223 60s [92mtick[0m 60s Test #224 60s [92mtick[0m 60s Test #225 60s [92mtick[0m 60s Test #226 60s [92mtick[0m 60s Test #227 60s [92mtick[0m 60s Test #228 60s [92mtick[0m 60s Test #229 60s [92mtick[0m 60s Test #230 60s [92mtick[0m 60s Test #231 60s [92mtick[0m 60s Test #232 60s [92mtick[0m 60s [95m[Code span][0m 60s Test #233 60s [92mtick[0m 60s Test #234 60s [92mtick[0m 60s Test #235 60s [92mtick[0m 60s Test #236 60s [92mtick[0m 60s Test #237 60s [92mtick[0m 60s Test #238 60s [92mtick[0m 60s Test #239 60s [92mtick[0m 60s Test #240 60s [92mtick[0m 60s Test #241 60s [92mtick[0m 60s Test #242 60s [92mtick[0m 60s Test #243 60s [92mtick[0m 60s Test #244 60s [92mtick[0m 60s Test #245 60s [92mtick[0m 60s [95m[Emphasis and strong emphasis][0m 60s Test #246 60s [92mtick[0m 60s Test #247 60s [92mtick[0m 60s Test #248 60s [92mtick[0m 60s Test #249 60s [92mtick[0m 60s Test #250 60s [92mtick[0m 60s Test #251 60s [92mtick[0m 60s Test #252 60s [92mtick[0m 60s Test #253 60s [92mtick[0m 60s Test #254 60s [92mtick[0m 60s Test #255 60s [92mtick[0m 60s Test #256 60s [92mtick[0m 60s Test #257 60s [92mtick[0m 60s Test #258 60s [92mtick[0m 60s Test #259 60s [92mtick[0m 60s Test #260 60s [92mtick[0m 60s Test #261 60s [92mtick[0m 60s Test #262 60s [92mtick[0m 60s Test #263 60s [92mtick[0m 60s Test #264 60s [92mtick[0m 60s Test #265 60s [92mtick[0m 60s Test #266 60s [92mtick[0m 60s Test #267 60s [92mtick[0m 60s Test #268 60s [92mtick[0m 60s Test #269 60s [92mtick[0m 60s Test #270 60s [92mtick[0m 60s Test #271 60s [92mtick[0m 60s Test #272 60s [92mtick[0m 60s Test #273 60s [92mtick[0m 60s Test #274 60s [92mtick[0m 60s Test #275 60s [92mtick[0m 60s Test #276 60s [92mtick[0m 60s Test #277 60s [92mtick[0m 60s Test #278 60s [92mtick[0m 60s Test #279 60s [92mtick[0m 60s Test #280 60s [92mtick[0m 60s Test #281 60s [92mtick[0m 60s Test #282 60s [92mtick[0m 60s Test #283 60s [92mtick[0m 60s Test #284 60s [92mtick[0m 60s Test #285 60s [92mtick[0m 60s Test #286 60s [92mtick[0m 60s Test #287 60s [92mtick[0m 60s Test #288 60s [92mtick[0m 60s Test #289 60s [92mtick[0m 60s Test #290 60s [92mtick[0m 60s Test #291 60s [92mtick[0m 60s Test #292 60s [92mtick[0m 60s Test #293 60s [92mtick[0m 60s Test #294 60s [92mtick[0m 60s Test #295 60s [92mtick[0m 60s Test #296 60s [92mtick[0m 60s Test #297 60s [92mtick[0m 60s Test #298 60s [92mtick[0m 60s Test #299 60s [92mtick[0m 60s Test #300 60s [92mtick[0m 60s Test #301 60s [92mtick[0m 60s Test #302 60s [92mtick[0m 60s Test #303 60s [92mtick[0m 60s Test #304 60s [92mtick[0m 60s Test #305 60s [92mtick[0m 60s Test #306 60s [92mtick[0m 60s Test #307 60s [92mtick[0m 60s Test #308 60s [92mtick[0m 60s Test #309 60s [92mtick[0m 60s Test #310 60s [92mtick[0m 60s Test #311 60s [92mtick[0m 60s Test #312 60s [92mtick[0m 60s Test #313 60s [92mtick[0m 60s Test #314 60s [92mtick[0m 60s Test #315 60s [92mtick[0m 60s Test #316 60s [92mtick[0m 60s Test #317 60s [92mtick[0m 60s Test #318 60s [92mtick[0m 60s Test #319 60s [92mtick[0m 60s Test #320 60s [92mtick[0m 60s Test #321 60s [92mtick[0m 60s Test #322 60s [92mtick[0m 60s Test #323 60s [92mtick[0m 60s Test #324 60s [92mtick[0m 60s Test #325 60s [92mtick[0m 60s Test #326 60s [92mtick[0m 60s Test #327 60s [92mtick[0m 60s [95m[Links][0m 60s Test #328 60s [92mtick[0m 60s Test #329 60s [92mtick[0m 60s Test #330 60s [92mtick[0m 60s Test #331 60s [92mtick[0m 60s Test #332 60s [92mtick[0m 60s Test #333 60s [92mtick[0m 60s Test #334 60s [92mtick[0m 60s Test #335 60s [92mtick[0m 60s Test #336 60s [92mtick[0m 60s Test #337 60s [92mtick[0m 60s Test #338 60s [92mtick[0m 60s Test #339 60s [92mtick[0m 60s Test #340 60s [92mtick[0m 60s Test #341 60s [92mtick[0m 60s Test #342 60s [92mtick[0m 60s Test #343 60s [92mtick[0m 60s Test #344 60s [92mtick[0m 60s Test #345 60s [92mtick[0m 60s Test #346 60s [92mtick[0m 60s Test #347 60s [92mtick[0m 60s Test #348 60s [92mtick[0m 60s Test #349 60s [92mtick[0m 60s Test #350 60s [92mtick[0m 60s Test #351 60s [92mtick[0m 60s Test #352 60s [92mtick[0m 60s Test #353 60s [92mtick[0m 60s Test #354 60s [92mtick[0m 60s Test #355 60s [92mtick[0m 60s Test #356 60s [92mtick[0m 60s Test #357 60s [92mtick[0m 60s Test #358 60s [92mtick[0m 60s Test #359 60s [92mtick[0m 60s Test #360 60s [92mtick[0m 60s Test #361 60s [92mtick[0m 60s Test #362 60s [92mtick[0m 60s Test #363 60s [92mtick[0m 60s Test #364 60s [92mtick[0m 60s Test #365 60s [92mtick[0m 60s Test #366 60s [92mtick[0m 60s Test #367 60s [92mtick[0m 60s Test #368 60s [92mtick[0m 60s Test #369 60s [92mtick[0m 60s Test #370 60s [92mtick[0m 60s Test #371 60s [92mtick[0m 60s Test #372 60s [92mtick[0m 60s Test #373 60s [92mtick[0m 60s Test #374 60s [92mtick[0m 60s Test #375 60s [92mtick[0m 60s [95m[Images][0m 60s Test #376 60s [92mtick[0m 60s Test #377 60s [92mtick[0m 60s Test #378 60s [92mtick[0m 60s Test #379 60s [92mtick[0m 60s Test #380 60s [92mtick[0m 60s Test #381 60s [92mtick[0m 60s Test #382 60s [92mtick[0m 60s Test #383 60s [92mtick[0m 60s Test #384 60s [92mtick[0m 60s Test #385 60s [92mtick[0m 60s Test #386 60s [92mtick[0m 60s Test #387 60s [92mtick[0m 60s Test #388 60s [92mtick[0m 60s Test #389 60s [92mtick[0m 60s Test #390 60s [92mtick[0m 60s Test #391 60s [92mtick[0m 60s Test #392 60s [92mtick[0m 60s Test #393 60s [92mtick[0m 60s Test #394 60s [92mtick[0m 60s Test #395 60s [92mtick[0m 60s [95m[Autolinks][0m 60s Test #396 60s [92mtick[0m 60s Test #397 60s [92mtick[0m 60s Test #398 60s [92mtick[0m 60s Test #399 60s [92mtick[0m 60s Test #400 60s [92mtick[0m 60s Test #401 60s [92mtick[0m 60s Test #402 60s [92mtick[0m 60s Test #403 60s [92mtick[0m 60s Test #404 60s [92mtick[0m 60s Test #405 60s [92mtick[0m 60s Test #406 60s [92mtick[0m 60s Test #407 60s [92mtick[0m 60s Test #408 60s [92mtick[0m 60s Test #409 60s [92mtick[0m 60s [95m[Raw HTML][0m 60s Test #410 60s [92mtick[0m 60s Test #411 60s [92mtick[0m 60s Test #412 60s [92mtick[0m 60s Test #413 60s [92mtick[0m 60s Test #414 60s [92mtick[0m 60s Test #415 60s [92mtick[0m 60s Test #416 60s [92mtick[0m 60s Test #417 60s [92mtick[0m 60s Test #418 60s [92mtick[0m 60s Test #419 60s [92mtick[0m 60s Test #420 60s [92mtick[0m 60s Test #421 60s [92mtick[0m 60s Test #422 60s [92mtick[0m 60s Test #423 60s [92mtick[0m 60s Test #424 60s [92mtick[0m 60s Test #425 60s [92mtick[0m 60s Test #426 60s [92mtick[0m 60s Test #427 60s [92mtick[0m 60s Test #428 60s [92mtick[0m 60s [95m[Hard line breaks][0m 60s Test #429 60s [92mtick[0m 60s Test #430 60s [92mtick[0m 60s Test #431 60s [92mtick[0m 60s Test #432 60s [92mtick[0m 60s Test #433 60s [92mtick[0m 60s Test #434 60s [92mtick[0m 60s Test #435 60s [92mtick[0m 60s Test #436 60s [92mtick[0m 60s Test #437 60s [92mtick[0m 60s Test #438 60s [92mtick[0m 60s Test #439 60s [92mtick[0m 60s [95m[Soft line breaks][0m 60s Test #440 60s [92mtick[0m 60s Test #441 60s [92mtick[0m 60s [95m[Strings][0m 60s Test #442 60s [92mtick[0m 60s Test #443 60s [92mtick[0m 60s Test #444 60s [92mtick[0m 60s 349 tests passed, 95 failed 60s runtime: 0.028415155999999997s 60s autopkgtest [15:58:33]: test command1: -----------------------] 60s command1 PASS 60s autopkgtest [15:58:33]: test command1: - - - - - - - - - - results - - - - - - - - - - 61s autopkgtest [15:58:34]: @@@@@@@@@@@@@@@@@@@@ summary 61s command1 PASS