0s autopkgtest [16:19:59]: starting date and time: 2025-10-18 16:19:59+0000 0s autopkgtest [16:19:59]: git checkout: 4b346b80 nova: make wait_reboot return success even when a no-op 0s autopkgtest [16:19:59]: host juju-7f2275-prod-proposed-migration-environment-15; command line: /home/ubuntu/autopkgtest/runner/autopkgtest --output-dir /tmp/autopkgtest-work.shkn5me1/out --timeout-copy=6000 --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-ppc64el --security-groups autopkgtest-juju-7f2275-prod-proposed-migration-environment-15@bos03-ppc64el-7.secgroup --name adt-resolute-ppc64el-commonmark-bkrs-20251018-161959-juju-7f2275-prod-proposed-migration-environment-15-be5a663f-c7eb-44db-9fdf-aea3a6974c19 --image adt/ubuntu-resolute-ppc64el-server --keyname testbed-juju-7f2275-prod-proposed-migration-environment-15 --net-id=net_prod-proposed-migration-ppc64el -e TERM=linux --mirror=http://ftpmaster.internal/ubuntu/ 4s Creating nova instance adt-resolute-ppc64el-commonmark-bkrs-20251018-161959-juju-7f2275-prod-proposed-migration-environment-15-be5a663f-c7eb-44db-9fdf-aea3a6974c19 from image adt/ubuntu-resolute-ppc64el-server-20251018.img (UUID 746a0a80-14f1-4bf7-89b6-cbb5ab236a4e)... 52s autopkgtest [16:20:51]: testbed dpkg architecture: ppc64el 52s autopkgtest [16:20:51]: testbed apt version: 3.1.8ubuntu1 53s autopkgtest [16:20:52]: @@@@@@@@@@@@@@@@@@@@ test bed setup 53s autopkgtest [16:20:52]: testbed release detected to be: None 54s autopkgtest [16:20:53]: updating testbed package index (apt update) 54s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease [83.3 kB] 54s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 54s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 54s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 54s Get:5 http://ftpmaster.internal/ubuntu resolute-proposed/universe Sources [345 kB] 55s Get:6 http://ftpmaster.internal/ubuntu resolute-proposed/main Sources [28.4 kB] 55s Get:7 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse Sources [15.4 kB] 55s Get:8 http://ftpmaster.internal/ubuntu resolute-proposed/restricted Sources [5028 B] 55s Get:9 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el Packages [73.4 kB] 55s Get:10 http://ftpmaster.internal/ubuntu resolute-proposed/restricted ppc64el Packages [940 B] 55s Get:11 http://ftpmaster.internal/ubuntu resolute-proposed/universe ppc64el Packages [222 kB] 55s Get:12 http://ftpmaster.internal/ubuntu resolute-proposed/multiverse ppc64el Packages [3808 B] 55s Fetched 777 kB in 1s (560 kB/s) 56s Reading package lists... 57s Failed to check for VM: Permission denied 57s Hit:1 http://ftpmaster.internal/ubuntu resolute-proposed InRelease 57s Hit:2 http://ftpmaster.internal/ubuntu resolute InRelease 57s Hit:3 http://ftpmaster.internal/ubuntu resolute-updates InRelease 57s Hit:4 http://ftpmaster.internal/ubuntu resolute-security InRelease 58s Reading package lists... 58s Reading package lists... 58s Building dependency tree... 58s Reading state information... 58s Calculating upgrade... 58s The following packages will be upgraded: 58s gir1.2-girepository-2.0 libgirepository-1.0-1 libpython3-stdlib python3 58s python3-minimal 58s 5 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 58s Need to get 185 kB of archives. 58s After this operation, 2048 B of additional disk space will be used. 58s Get:1 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3-minimal ppc64el 3.13.7-2 [27.8 kB] 59s Get:2 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el python3 ppc64el 3.13.7-2 [23.9 kB] 59s Get:3 http://ftpmaster.internal/ubuntu resolute-proposed/main ppc64el libpython3-stdlib ppc64el 3.13.7-2 [10.6 kB] 59s Get:4 http://ftpmaster.internal/ubuntu resolute/main ppc64el libgirepository-1.0-1 ppc64el 1.86.0-6 [97.4 kB] 59s Get:5 http://ftpmaster.internal/ubuntu resolute/main ppc64el gir1.2-girepository-2.0 ppc64el 1.86.0-6 [25.3 kB] 59s dpkg-preconfigure: unable to re-open stdin: No such file or directory 59s Fetched 185 kB in 0s (425 kB/s) 59s (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 ... 76461 files and directories currently installed.) 59s Preparing to unpack .../python3-minimal_3.13.7-2_ppc64el.deb ... 59s Unpacking python3-minimal (3.13.7-2) over (3.13.7-1) ... 59s Setting up python3-minimal (3.13.7-2) ... 59s (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 ... 76461 files and directories currently installed.) 59s Preparing to unpack .../python3_3.13.7-2_ppc64el.deb ... 60s running python pre-rtupdate hooks for python3.13... 60s Unpacking python3 (3.13.7-2) over (3.13.7-1) ... 60s Preparing to unpack .../libpython3-stdlib_3.13.7-2_ppc64el.deb ... 60s Unpacking libpython3-stdlib:ppc64el (3.13.7-2) over (3.13.7-1) ... 60s Preparing to unpack .../libgirepository-1.0-1_1.86.0-6_ppc64el.deb ... 60s Unpacking libgirepository-1.0-1:ppc64el (1.86.0-6) over (1.84.0-1) ... 60s Preparing to unpack .../gir1.2-girepository-2.0_1.86.0-6_ppc64el.deb ... 60s Unpacking gir1.2-girepository-2.0:ppc64el (1.86.0-6) over (1.84.0-1) ... 60s Setting up libgirepository-1.0-1:ppc64el (1.86.0-6) ... 60s Setting up libpython3-stdlib:ppc64el (3.13.7-2) ... 60s Setting up python3 (3.13.7-2) ... 60s running python rtupdate hooks for python3.13... 60s running python post-rtupdate hooks for python3.13... 60s Setting up gir1.2-girepository-2.0:ppc64el (1.86.0-6) ... 60s Processing triggers for man-db (2.13.1-1) ... 61s Processing triggers for libc-bin (2.42-0ubuntu3) ... 61s autopkgtest [16:21:00]: upgrading testbed (apt dist-upgrade and autopurge) 61s Reading package lists... 61s Building dependency tree... 61s Reading state information... 61s Calculating upgrade... 61s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 61s Reading package lists... 62s Building dependency tree... 62s Reading state information... 62s Solving dependencies... 62s 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 64s autopkgtest [16:21:03]: testbed running kernel: Linux 6.17.0-5-generic #5-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 22 10:02:41 UTC 2025 65s autopkgtest [16:21:04]: @@@@@@@@@@@@@@@@@@@@ apt-source commonmark-bkrs 67s Get:1 http://ftpmaster.internal/ubuntu resolute/universe commonmark-bkrs 0.5.4+ds-7.1 (dsc) [2272 B] 67s Get:2 http://ftpmaster.internal/ubuntu resolute/universe commonmark-bkrs 0.5.4+ds-7.1 (tar) [81.9 kB] 67s Get:3 http://ftpmaster.internal/ubuntu resolute/universe commonmark-bkrs 0.5.4+ds-7.1 (diff) [6860 B] 67s gpgv: Signature made Thu Feb 8 00:40:02 2024 UTC 67s gpgv: using RSA key D56571B88A8BBAF140BF63D6BD7EAA60778FA6F5 67s gpgv: issuer "doko@debian.org" 67s gpgv: Can't check signature: No public key 67s dpkg-source: warning: cannot verify inline signature for ./commonmark-bkrs_0.5.4+ds-7.1.dsc: no acceptable signature found 67s autopkgtest [16:21:06]: testing package commonmark-bkrs version 0.5.4+ds-7.1 67s autopkgtest [16:21:06]: build not needed 68s autopkgtest [16:21:07]: test command1: preparing testbed 68s Reading package lists... 68s Building dependency tree... 68s Reading state information... 68s Solving dependencies... 68s The following NEW packages will be installed: 68s python-commonmark-bkrs-doc python3-commonmark-bkrs 68s 0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded. 68s Need to get 95.7 kB of archives. 68s After this operation, 1084 kB of additional disk space will be used. 68s Get:1 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python-commonmark-bkrs-doc all 0.5.4+ds-7.1 [64.2 kB] 68s Get:2 http://ftpmaster.internal/ubuntu resolute/universe ppc64el python3-commonmark-bkrs all 0.5.4+ds-7.1 [31.4 kB] 69s Fetched 95.7 kB in 0s (284 kB/s) 69s Selecting previously unselected package python-commonmark-bkrs-doc. 69s (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 ... 76461 files and directories currently installed.) 69s Preparing to unpack .../python-commonmark-bkrs-doc_0.5.4+ds-7.1_all.deb ... 69s Unpacking python-commonmark-bkrs-doc (0.5.4+ds-7.1) ... 69s Selecting previously unselected package python3-commonmark-bkrs. 69s Preparing to unpack .../python3-commonmark-bkrs_0.5.4+ds-7.1_all.deb ... 69s Unpacking python3-commonmark-bkrs (0.5.4+ds-7.1) ... 69s Setting up python-commonmark-bkrs-doc (0.5.4+ds-7.1) ... 69s Setting up python3-commonmark-bkrs (0.5.4+ds-7.1) ... 69s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:186: SyntaxWarning: invalid escape sequence '\s' 69s return bool(re.compile("^\s*$").match(s)) 69s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:338: SyntaxWarning: invalid escape sequence '\/' 69s "^<([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])?)*)>") 69s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:385: SyntaxWarning: invalid escape sequence '\s' 69s numdelims <= 3) and (not re.match("\s", char_after)) 69s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:387: SyntaxWarning: invalid escape sequence '\s' 69s numdelims <= 3) and (not re.match("\s", char_before)) 69s /usr/lib/python3/dist-packages/CommonMark_bkrs/CommonMark.py:1008: SyntaxWarning: invalid escape sequence '\g' 69s re.sub(r'(?:(\\#) *#*| *#+) *$', '\g<1>', ln[offset:])] 69s Processing triggers for man-db (2.13.1-1) ... 70s autopkgtest [16:21:09]: test command1: cd /usr/share/doc/python-commonmark-bkrs-doc/tests/ && python3 test-CommonMark.py 70s autopkgtest [16:21:09]: test command1: [----------------------- 70s /usr/share/doc/python-commonmark-bkrs-doc/examples/tests/test-CommonMark.py:67: SyntaxWarning: invalid escape sequence '\.' 70s testMatch = re.findall(re.compile("^\.\n([\s\S]*?)^\.\n([\s\S]*?)^.$|^#{1,6} *(.*)$", re.M), tests) 71s [Preprocessing] 71s Test #1 71s tick 71s Test #2 71s tick 71s [Precedence] 71s Test #3 71s tick 71s [Horizontal rules] 71s Test #4 71s tick 71s Test #5 71s tick 71s Test #6 71s tick 71s Test #7 71s tick 71s Test #8 71s tick 71s Test #9 71s tick 71s Test #10 71s tick 71s Test #11 71s tick 71s Test #12 71s tick 71s Test #13 71s tick 71s Test #14 71s tick 71s Test #15 71s tick 71s Test #16 71s tick 71s Test #17 71s tick 71s Test #18 71s tick 71s Test #19 71s tick 71s Test #20 71s tick 71s Test #21 71s tick 71s Test #22 71s tick 71s [ATX headers] 71s Test #23 71s tick 71s Test #24 71s tick 71s Test #25 71s tick 71s Test #26 71s tick 71s Test #27 71s tick 71s Test #28 71s tick 71s Test #29 71s tick 71s Test #30 71s tick 71s Test #31 71s tick 71s Test #32 71s tick 71s Test #33 71s tick 71s Test #34 71s tick 71s Test #35 71s tick 71s Test #36 71s tick 71s Test #37 71s tick 71s Test #38 71s tick 71s Test #39 71s tick 71s [Setext headers] 71s Test #40 71s tick 71s Test #41 71s tick 71s Test #42 71s tick 71s Test #43 71s tick 71s Test #44 71s tick 71s Test #45 71s tick 71s Test #46 71s tick 71s Test #47 71s tick 71s Test #48 71s tick 71s Test #49 71s tick 71s Test #50 71s tick 71s Test #51 71s tick 71s Test #52 71s tick 71s Test #53 71s tick 71s [Indented code blocks] 71s Test #54 71s tick 71s Test #55 71s tick 71s Test #56 71s tick 71s Test #57 71s tick 71s Test #58 71s tick 71s Test #59 71s tick 71s Test #60 71s tick 71s Test #61 71s tick 71s Test #62 71s cross 71s === markdown =============== 71s  71s ␣␣␣␣ 71s ␣␣␣␣foo 71s ␣␣␣␣ 71s 71s  71s === expected =============== 71s 
foo
 71s 
71s  71s === got ==================== 71s 
foo
 71s 
 71s 
71s 71s Test #63 71s tick 71s [Fenced code blocks] 71s Test #64 71s tick 71s Test #65 71s tick 71s Test #66 71s tick 71s Test #67 71s tick 71s Test #68 71s tick 71s Test #69 71s tick 71s Test #70 71s tick 71s Test #71 71s tick 71s Test #72 71s tick 71s Test #73 71s tick 71s Test #74 71s tick 71s Test #75 71s tick 71s Test #76 71s tick 71s Test #77 71s tick 71s Test #78 71s tick 71s Test #79 71s tick 71s Test #80 71s tick 71s Test #81 71s tick 71s Test #82 71s tick 71s Test #83 71s tick 71s Test #84 71s tick 71s Test #85 71s tick 71s Test #86 71s tick 71s [HTML blocks] 71s Test #87 71s tick 71s Test #88 71s tick 71s Test #89 71s tick 71s Test #90 71s tick 71s Test #91 71s tick 71s Test #92 71s tick 71s Test #93 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s  71s 71s Test #94 71s cross 71s === markdown =============== 71s  71s The␣opening␣tag␣can␣be␣indented␣1-3␣spaces,␣but␣not␣4: 71s 71s  71s === expected =============== 71s ␣␣ 71s 71s ␣␣␣␣ 71s  71s === got ==================== 71s 

The␣opening␣tag␣can␣be␣indented␣1-3␣spaces,␣but␣not␣4:

71s 71s Test #95 71s cross 71s === markdown =============== 71s  71s An␣HTML␣block␣can␣interrupt␣a␣paragraph,␣and␣need␣not␣be␣preceded 71s by␣a␣blank␣line. 71s 71s  71s === expected =============== 71s Foo 71s
71s bar 71s
71s  71s === got ==================== 71s 

An␣HTML␣block␣can␣interrupt␣a␣paragraph,␣and␣need␣not␣be␣preceded 71s by␣a␣blank␣line.

71s 71s Test #96 71s cross 71s === markdown =============== 71s  71s However,␣a␣following␣blank␣line␣is␣always␣needed,␣except␣at␣the␣end␣of 71s a␣document: 71s 71s  71s === expected =============== 71s 
71s bar 71s
71s *foo* 71s  71s === got ==================== 71s 

However,␣a␣following␣blank␣line␣is␣always␣needed,␣except␣at␣the␣end␣of 71s a␣document:

71s 71s Test #97 71s cross 71s === markdown =============== 71s  71s An␣incomplete␣HTML␣block␣tag␣may␣also␣start␣an␣HTML␣block: 71s 71s  71s === expected =============== 71s An␣incomplete␣HTML␣block␣tag␣may␣also␣start␣an␣HTML␣block:

71s 71s Test #98 71s cross 71s === markdown =============== 71s  71s This␣rule␣differs␣from␣John␣Gruber's␣original␣Markdown␣syntax 71s specification,␣which␣says: 71s 71s >␣The␣only␣restrictions␣are␣that␣block-level␣HTML␣elements␣— 71s >␣e.g.␣`
`,␣``,␣`
`,␣`

`,␣etc.␣—␣must␣be␣separated␣from 71s >␣surrounding␣content␣by␣blank␣lines,␣and␣the␣start␣and␣end␣tags␣of␣the 71s >␣block␣should␣not␣be␣indented␣with␣tabs␣or␣spaces. 71s 71s In␣some␣ways␣Gruber's␣rule␣is␣more␣restrictive␣than␣the␣one␣given 71s here: 71s 71s -␣It␣requires␣that␣an␣HTML␣block␣be␣preceded␣by␣a␣blank␣line. 71s -␣It␣does␣not␣allow␣the␣start␣tag␣to␣be␣indented. 71s -␣It␣requires␣a␣matching␣end␣tag,␣which␣it␣also␣does␣not␣allow␣to 71s ␣␣be␣indented. 71s 71s Indeed,␣most␣Markdown␣implementations,␣including␣some␣of␣Gruber's 71s own␣perl␣implementations,␣do␣not␣impose␣these␣restrictions. 71s 71s There␣is␣one␣respect,␣however,␣in␣which␣Gruber's␣rule␣is␣more␣liberal 71s than␣the␣one␣given␣here,␣since␣it␣allows␣blank␣lines␣to␣occur␣inside 71s an␣HTML␣block.␣␣There␣are␣two␣reasons␣for␣disallowing␣them␣here. 71s First,␣it␣removes␣the␣need␣to␣parse␣balanced␣tags,␣which␣is 71s expensive␣and␣can␣require␣backtracking␣from␣the␣end␣of␣the␣document 71s if␣no␣matching␣end␣tag␣is␣found.␣Second,␣it␣provides␣a␣very␣simple 71s and␣flexible␣way␣of␣including␣Markdown␣content␣inside␣HTML␣tags: 71s simply␣separate␣the␣Markdown␣from␣the␣HTML␣using␣blank␣lines: 71s 71s  71s === expected =============== 71s 

71s 71s *Emphasized*␣text. 71s 71s
71s  71s === got ==================== 71s 

This␣rule␣differs␣from␣John␣Gruber's␣original␣Markdown␣syntax 71s specification,␣which␣says:

71s
71s

The␣only␣restrictions␣are␣that␣block-level␣HTML␣elements␣— 71s e.g.␣<div>,␣<table>,␣<pre>,␣<p>,␣etc.␣—␣must␣be␣separated␣from 71s surrounding␣content␣by␣blank␣lines,␣and␣the␣start␣and␣end␣tags␣of␣the 71s block␣should␣not␣be␣indented␣with␣tabs␣or␣spaces.

71s
71s

In␣some␣ways␣Gruber's␣rule␣is␣more␣restrictive␣than␣the␣one␣given 71s here:

71s
    71s
  • It␣requires␣that␣an␣HTML␣block␣be␣preceded␣by␣a␣blank␣line.
  • 71s
  • It␣does␣not␣allow␣the␣start␣tag␣to␣be␣indented.
  • 71s
  • It␣requires␣a␣matching␣end␣tag,␣which␣it␣also␣does␣not␣allow␣to 71s be␣indented.
  • 71s
71s

Indeed,␣most␣Markdown␣implementations,␣including␣some␣of␣Gruber's 71s own␣perl␣implementations,␣do␣not␣impose␣these␣restrictions.

71s

There␣is␣one␣respect,␣however,␣in␣which␣Gruber's␣rule␣is␣more␣liberal 71s than␣the␣one␣given␣here,␣since␣it␣allows␣blank␣lines␣to␣occur␣inside 71s an␣HTML␣block.␣␣There␣are␣two␣reasons␣for␣disallowing␣them␣here. 71s First,␣it␣removes␣the␣need␣to␣parse␣balanced␣tags,␣which␣is 71s expensive␣and␣can␣require␣backtracking␣from␣the␣end␣of␣the␣document 71s if␣no␣matching␣end␣tag␣is␣found.␣Second,␣it␣provides␣a␣very␣simple 71s and␣flexible␣way␣of␣including␣Markdown␣content␣inside␣HTML␣tags: 71s simply␣separate␣the␣Markdown␣from␣the␣HTML␣using␣blank␣lines:

71s 71s Test #99 71s cross 71s === markdown =============== 71s  71s Compare: 71s 71s  71s === expected =============== 71s 
71s *Emphasized*␣text. 71s
71s  71s === got ==================== 71s 

Compare:

71s 71s Test #100 71s cross 71s === markdown =============== 71s  71s Some␣Markdown␣implementations␣have␣adopted␣a␣convention␣of 71s interpreting␣content␣inside␣tags␣as␣text␣if␣the␣open␣tag␣has 71s the␣attribute␣`markdown=1`.␣␣The␣rule␣given␣above␣seems␣a␣simpler␣and 71s more␣elegant␣way␣of␣achieving␣the␣same␣expressive␣power,␣which␣is␣also 71s much␣simpler␣to␣parse. 71s 71s The␣main␣potential␣drawback␣is␣that␣one␣can␣no␣longer␣paste␣HTML 71s blocks␣into␣Markdown␣documents␣with␣100%␣reliability.␣␣However, 71s *in␣most␣cases*␣this␣will␣work␣fine,␣because␣the␣blank␣lines␣in 71s HTML␣are␣usually␣followed␣by␣HTML␣block␣tags.␣␣For␣example: 71s 71s  71s === expected =============== 71s 
71s 71s 71s 71s 71s 71s 71s 71s
71s Hi 71s
71s  71s === got ==================== 71s 

Some␣Markdown␣implementations␣have␣adopted␣a␣convention␣of 71s interpreting␣content␣inside␣tags␣as␣text␣if␣the␣open␣tag␣has 71s the␣attribute␣markdown=1.␣␣The␣rule␣given␣above␣seems␣a␣simpler␣and 71s more␣elegant␣way␣of␣achieving␣the␣same␣expressive␣power,␣which␣is␣also 71s much␣simpler␣to␣parse.

71s

The␣main␣potential␣drawback␣is␣that␣one␣can␣no␣longer␣paste␣HTML 71s blocks␣into␣Markdown␣documents␣with␣100%␣reliability.␣␣However, 71s in␣most␣cases␣this␣will␣work␣fine,␣because␣the␣blank␣lines␣in 71s HTML␣are␣usually␣followed␣by␣HTML␣block␣tags.␣␣For␣example:

71s 71s Test #101 71s cross 71s === markdown =============== 71s  71s Moreover,␣blank␣lines␣are␣usually␣not␣necessary␣and␣can␣be 71s deleted.␣␣The␣exception␣is␣inside␣`
`␣tags;␣here,␣one␣can
 71s replace␣the␣blank␣lines␣with␣`
`␣entities.
 71s 
 71s So␣there␣is␣no␣important␣loss␣of␣expressive␣power␣with␣the␣new␣rule.
 71s 
 71s ##␣Link␣reference␣definitions
 71s 
 71s A␣[link␣reference␣definition](#link-reference-definition)
 71s ␣consists␣of␣a␣[link
 71s label](#link-label),␣indented␣up␣to␣three␣spaces,␣followed
 71s by␣a␣colon␣(`:`),␣optional␣blank␣space␣(including␣up␣to␣one
 71s newline),␣a␣[link␣destination](#link-destination),␣optional
 71s blank␣space␣(including␣up␣to␣one␣newline),␣and␣an␣optional␣[link
 71s title](#link-title),␣which␣if␣it␣is␣present␣must␣be␣separated
 71s from␣the␣[link␣destination](#link-destination)␣by␣whitespace.
 71s No␣further␣non-space␣characters␣may␣occur␣on␣the␣line.
 71s 
 71s A␣[link␣reference-definition](#link-reference-definition)
 71s does␣not␣correspond␣to␣a␣structural␣element␣of␣a␣document.␣␣Instead,␣it
 71s defines␣a␣label␣which␣can␣be␣used␣in␣[reference␣links](#reference-link)
 71s and␣reference-style␣[images](#image)␣elsewhere␣in␣the␣document.␣␣[Link
 71s reference␣definitions]␣can␣come␣either␣before␣or␣after␣the␣links␣that␣use
 71s them.
 71s 
 71s 
 71s === expected ===============
 71s [foo]:␣/url␣"title"
 71s 
 71s [foo]
 71s 
 71s === got ====================
 71s 

Moreover,␣blank␣lines␣are␣usually␣not␣necessary␣and␣can␣be 71s deleted.␣␣The␣exception␣is␣inside␣<pre>␣tags;␣here,␣one␣can 71s replace␣the␣blank␣lines␣with␣&#10;␣entities.

71s

So␣there␣is␣no␣important␣loss␣of␣expressive␣power␣with␣the␣new␣rule.

71s

Link␣reference␣definitions

71s

A␣link␣reference␣definition 71s ␣consists␣of␣a␣link 71s label,␣indented␣up␣to␣three␣spaces,␣followed 71s by␣a␣colon␣(:),␣optional␣blank␣space␣(including␣up␣to␣one 71s newline),␣a␣link␣destination,␣optional 71s blank␣space␣(including␣up␣to␣one␣newline),␣and␣an␣optional␣link 71s title,␣which␣if␣it␣is␣present␣must␣be␣separated 71s from␣the␣link␣destination␣by␣whitespace. 71s No␣further␣non-space␣characters␣may␣occur␣on␣the␣line.

71s

A␣link␣reference-definition 71s does␣not␣correspond␣to␣a␣structural␣element␣of␣a␣document.␣␣Instead,␣it 71s defines␣a␣label␣which␣can␣be␣used␣in␣reference␣links 71s and␣reference-style␣images␣elsewhere␣in␣the␣document.␣␣[Link 71s reference␣definitions]␣can␣come␣either␣before␣or␣after␣the␣links␣that␣use 71s them.

71s 71s Test #102 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s ␣␣␣[foo]:␣ 71s ␣␣␣␣␣␣/url␣␣ 71s ␣␣␣␣␣␣␣␣␣␣␣'the␣title'␣␣ 71s 71s [foo] 71s  71s === got ==================== 71s  71s Test #103 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s [Foo*bar\]]:my_(url)␣'title␣(with␣parens)' 71s 71s [Foo*bar\]] 71s  71s === got ==================== 71s  71s Test #104 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s [Foo␣bar]: 71s 71s 'title' 71s 71s [Foo␣bar] 71s  71s === got ==================== 71s  71s Test #105 71s cross 71s === markdown =============== 71s  71s The␣title␣may␣be␣omitted: 71s 71s  71s === expected =============== 71s [foo]: 71s /url 71s 71s [foo] 71s  71s === got ==================== 71s 

The␣title␣may␣be␣omitted:

71s 71s Test #106 71s cross 71s === markdown =============== 71s  71s The␣link␣destination␣may␣not␣be␣omitted: 71s 71s  71s === expected =============== 71s [foo]: 71s 71s [foo] 71s  71s === got ==================== 71s 

The␣link␣destination␣may␣not␣be␣omitted:

71s 71s Test #107 71s cross 71s === markdown =============== 71s  71s A␣link␣can␣come␣before␣its␣corresponding␣definition: 71s 71s  71s === expected =============== 71s [foo] 71s 71s [foo]:␣url 71s  71s === got ==================== 71s 

A␣link␣can␣come␣before␣its␣corresponding␣definition:

71s 71s Test #108 71s cross 71s === markdown =============== 71s  71s If␣there␣are␣several␣matching␣definitions,␣the␣first␣one␣takes 71s precedence: 71s 71s  71s === expected =============== 71s [foo] 71s 71s [foo]:␣first 71s [foo]:␣second 71s  71s === got ==================== 71s 

If␣there␣are␣several␣matching␣definitions,␣the␣first␣one␣takes 71s precedence:

71s 71s Test #109 71s cross 71s === markdown =============== 71s  71s As␣noted␣in␣the␣section␣on␣[Links],␣matching␣of␣labels␣is 71s case-insensitive␣(see␣[matches](#matches)). 71s 71s  71s === expected =============== 71s [FOO]:␣/url 71s 71s [Foo] 71s  71s === got ==================== 71s 

As␣noted␣in␣the␣section␣on␣[Links],␣matching␣of␣labels␣is 71s case-insensitive␣(see␣matches).

71s 71s Test #110 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s [ΑΓΩ]:␣/φου 71s 71s [αγω] 71s  71s === got ==================== 71s  71s Test #111 71s cross 71s === markdown =============== 71s  71s Here␣is␣a␣link␣reference␣definition␣with␣no␣corresponding␣link. 71s It␣contributes␣nothing␣to␣the␣document. 71s 71s  71s === expected =============== 71s [foo]:␣/url 71s  71s === got ==================== 71s 

Here␣is␣a␣link␣reference␣definition␣with␣no␣corresponding␣link. 71s It␣contributes␣nothing␣to␣the␣document.

71s 71s Test #112 71s cross 71s === markdown =============== 71s  71s This␣is␣not␣a␣link␣reference␣definition,␣because␣there␣are 71s non-space␣characters␣after␣the␣title: 71s 71s  71s === expected =============== 71s [foo]:␣/url␣"title"␣ok 71s  71s === got ==================== 71s 

This␣is␣not␣a␣link␣reference␣definition,␣because␣there␣are 71s non-space␣characters␣after␣the␣title:

71s 71s Test #113 71s cross 71s === markdown =============== 71s  71s This␣is␣not␣a␣link␣reference␣definition,␣because␣it␣is␣indented 71s four␣spaces: 71s 71s  71s === expected =============== 71s ␣␣␣␣[foo]:␣/url␣"title" 71s 71s [foo] 71s  71s === got ==================== 71s 

This␣is␣not␣a␣link␣reference␣definition,␣because␣it␣is␣indented 71s four␣spaces:

71s 71s Test #114 71s cross 71s === markdown =============== 71s  71s This␣is␣not␣a␣link␣reference␣definition,␣because␣it␣occurs␣inside 71s a␣code␣block: 71s 71s  71s === expected =============== 71s ``` 71s [foo]:␣/url 71s ``` 71s 71s [foo] 71s  71s === got ==================== 71s 

This␣is␣not␣a␣link␣reference␣definition,␣because␣it␣occurs␣inside 71s a␣code␣block:

71s 71s Test #115 71s cross 71s === markdown =============== 71s  71s A␣[link␣reference␣definition](#link-reference-definition)␣cannot 71s interrupt␣a␣paragraph. 71s 71s  71s === expected =============== 71s Foo 71s [bar]:␣/baz 71s 71s [bar] 71s  71s === got ==================== 71s 

A␣link␣reference␣definition␣cannot 71s interrupt␣a␣paragraph.

71s 71s Test #116 71s cross 71s === markdown =============== 71s  71s However,␣it␣can␣directly␣follow␣other␣block␣elements,␣such␣as␣headers 71s and␣horizontal␣rules,␣and␣it␣need␣not␣be␣followed␣by␣a␣blank␣line. 71s 71s  71s === expected =============== 71s #␣[Foo] 71s [foo]:␣/url 71s >␣bar 71s  71s === got ==================== 71s 

However,␣it␣can␣directly␣follow␣other␣block␣elements,␣such␣as␣headers 71s and␣horizontal␣rules,␣and␣it␣need␣not␣be␣followed␣by␣a␣blank␣line.

71s 71s Test #117 71s cross 71s === markdown =============== 71s  71s Several␣[link␣references](#link-reference)␣can␣occur␣one␣after␣another, 71s without␣intervening␣blank␣lines. 71s 71s  71s === expected =============== 71s [foo]:␣/foo-url␣"foo" 71s [bar]:␣/bar-url 71s ␣␣"bar" 71s [baz]:␣/baz-url 71s 71s [foo], 71s [bar], 71s [baz] 71s  71s === got ==================== 71s 

Several␣link␣references␣can␣occur␣one␣after␣another, 71s without␣intervening␣blank␣lines.

71s 71s Test #118 71s cross 71s === markdown =============== 71s  71s [Link␣reference␣definitions](#link-reference-definition)␣can␣occur 71s inside␣block␣containers,␣like␣lists␣and␣block␣quotations.␣␣They 71s affect␣the␣entire␣document,␣not␣just␣the␣container␣in␣which␣they 71s are␣defined: 71s 71s  71s === expected =============== 71s [foo] 71s 71s >␣[foo]:␣/url 71s  71s === got ==================== 71s 

Link␣reference␣definitions␣can␣occur 71s inside␣block␣containers,␣like␣lists␣and␣block␣quotations.␣␣They 71s affect␣the␣entire␣document,␣not␣just␣the␣container␣in␣which␣they 71s are␣defined:

71s 71s Test #119 71s cross 71s === markdown =============== 71s  71s 71s ##␣Paragraphs 71s 71s A␣sequence␣of␣non-blank␣lines␣that␣cannot␣be␣interpreted␣as␣other 71s kinds␣of␣blocks␣forms␣a␣[paragraph](#paragraph). 71s The␣contents␣of␣the␣paragraph␣are␣the␣result␣of␣parsing␣the 71s paragraph's␣raw␣content␣as␣inlines.␣␣The␣paragraph's␣raw␣content 71s is␣formed␣by␣concatenating␣the␣lines␣and␣removing␣initial␣and␣final 71s spaces. 71s 71s A␣simple␣example␣with␣two␣paragraphs: 71s 71s  71s === expected =============== 71s aaa 71s 71s bbb 71s  71s === got ==================== 71s 

Paragraphs

71s

A␣sequence␣of␣non-blank␣lines␣that␣cannot␣be␣interpreted␣as␣other 71s kinds␣of␣blocks␣forms␣a␣paragraph. 71s The␣contents␣of␣the␣paragraph␣are␣the␣result␣of␣parsing␣the 71s paragraph's␣raw␣content␣as␣inlines.␣␣The␣paragraph's␣raw␣content 71s is␣formed␣by␣concatenating␣the␣lines␣and␣removing␣initial␣and␣final 71s spaces.

71s

A␣simple␣example␣with␣two␣paragraphs:

71s 71s Test #120 71s cross 71s === markdown =============== 71s  71s Paragraphs␣can␣contain␣multiple␣lines,␣but␣no␣blank␣lines: 71s 71s  71s === expected =============== 71s aaa 71s bbb 71s 71s ccc 71s ddd 71s  71s === got ==================== 71s 

Paragraphs␣can␣contain␣multiple␣lines,␣but␣no␣blank␣lines:

71s 71s Test #121 71s cross 71s === markdown =============== 71s  71s Multiple␣blank␣lines␣between␣paragraph␣have␣no␣effect: 71s 71s  71s === expected =============== 71s aaa 71s 71s 71s bbb 71s  71s === got ==================== 71s 

Multiple␣blank␣lines␣between␣paragraph␣have␣no␣effect:

71s 71s Test #122 71s cross 71s === markdown =============== 71s  71s Leading␣spaces␣are␣skipped: 71s 71s  71s === expected =============== 71s ␣␣aaa 71s ␣bbb 71s  71s === got ==================== 71s 

Leading␣spaces␣are␣skipped:

71s 71s Test #123 71s cross 71s === markdown =============== 71s  71s Lines␣after␣the␣first␣may␣be␣indented␣any␣amount,␣since␣indented 71s code␣blocks␣cannot␣interrupt␣paragraphs. 71s 71s  71s === expected =============== 71s aaa 71s ␣␣␣␣␣␣␣␣␣␣␣␣␣bbb 71s ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ccc 71s  71s === got ==================== 71s 

Lines␣after␣the␣first␣may␣be␣indented␣any␣amount,␣since␣indented 71s code␣blocks␣cannot␣interrupt␣paragraphs.

71s 71s Test #124 71s cross 71s === markdown =============== 71s  71s However,␣the␣first␣line␣may␣be␣indented␣at␣most␣three␣spaces, 71s or␣an␣indented␣code␣block␣will␣be␣triggered: 71s 71s  71s === expected =============== 71s ␣␣␣aaa 71s bbb 71s  71s === got ==================== 71s 

However,␣the␣first␣line␣may␣be␣indented␣at␣most␣three␣spaces, 71s or␣an␣indented␣code␣block␣will␣be␣triggered:

71s 71s Test #125 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s ␣␣␣␣aaa 71s bbb 71s  71s === got ==================== 71s  71s Test #126 71s cross 71s === markdown =============== 71s  71s Final␣spaces␣are␣stripped␣before␣inline␣parsing,␣so␣a␣paragraph 71s that␣ends␣with␣two␣or␣more␣spaces␣will␣not␣end␣with␣a␣hard␣line 71s break: 71s 71s  71s === expected =============== 71s aaa␣␣␣␣␣ 71s bbb␣␣␣␣␣ 71s  71s === got ==================== 71s 

Final␣spaces␣are␣stripped␣before␣inline␣parsing,␣so␣a␣paragraph 71s that␣ends␣with␣two␣or␣more␣spaces␣will␣not␣end␣with␣a␣hard␣line 71s break:

71s 71s Test #127 71s cross 71s === markdown =============== 71s  71s ##␣Blank␣lines 71s 71s [Blank␣lines](#blank-line)␣between␣block-level␣elements␣are␣ignored, 71s except␣for␣the␣role␣they␣play␣in␣determining␣whether␣a␣[list](#list) 71s is␣[tight](#tight)␣or␣[loose](#loose). 71s 71s Blank␣lines␣at␣the␣beginning␣and␣end␣of␣the␣document␣are␣also␣ignored. 71s 71s  71s === expected =============== 71s ␣␣ 71s 71s aaa 71s ␣␣ 71s 71s #␣aaa 71s 71s ␣␣ 71s  71s === got ==================== 71s 

Blank␣lines

71s

Blank␣lines␣between␣block-level␣elements␣are␣ignored, 71s except␣for␣the␣role␣they␣play␣in␣determining␣whether␣a␣list 71s is␣tight␣or␣loose.

71s

Blank␣lines␣at␣the␣beginning␣and␣end␣of␣the␣document␣are␣also␣ignored.

71s 71s Test #128 71s cross 71s === markdown =============== 71s  71s 71s #␣Container␣blocks 71s 71s A␣[container␣block](#container-block)␣is␣a␣block␣that␣has␣other 71s blocks␣as␣its␣contents.␣␣There␣are␣two␣basic␣kinds␣of␣container␣blocks: 71s [block␣quotes](#block-quote)␣and␣[list␣items](#list-item). 71s [Lists](#list)␣are␣meta-containers␣for␣[list␣items](#list-item). 71s 71s We␣define␣the␣syntax␣for␣container␣blocks␣recursively.␣␣The␣general 71s form␣of␣the␣definition␣is: 71s 71s >␣If␣X␣is␣a␣sequence␣of␣blocks,␣then␣the␣result␣of 71s >␣transforming␣X␣in␣such-and-such␣a␣way␣is␣a␣container␣of␣type␣Y 71s >␣with␣these␣blocks␣as␣its␣content. 71s 71s So,␣we␣explain␣what␣counts␣as␣a␣block␣quote␣or␣list␣item␣by␣explaining 71s how␣these␣can␣be␣*generated*␣from␣their␣contents.␣This␣should␣suffice 71s to␣define␣the␣syntax,␣although␣it␣does␣not␣give␣a␣recipe␣for␣*parsing* 71s these␣constructions.␣␣(A␣recipe␣is␣provided␣below␣in␣the␣section␣entitled 71s [A␣parsing␣strategy](#appendix-a-a-parsing-strategy).) 71s 71s ##␣Block␣quotes 71s 71s A␣[block␣quote␣marker](#block-quote-marker)␣ 71s consists␣of␣0-3␣spaces␣of␣initial␣indent,␣plus␣(a)␣the␣character␣`>`␣together 71s with␣a␣following␣space,␣or␣(b)␣a␣single␣character␣`>`␣not␣followed␣by␣a␣space. 71s 71s The␣following␣rules␣define␣[block␣quotes](#block-quote): 71s 71s 71s 1.␣␣**Basic␣case.**␣␣If␣a␣string␣of␣lines␣*Ls*␣constitute␣a␣sequence 71s ␣␣␣␣of␣blocks␣*Bs*,␣then␣the␣result␣of␣appending␣a␣[block␣quote 71s ␣␣␣␣marker](#block-quote-marker)␣to␣the␣beginning␣of␣each␣line␣in␣*Ls* 71s ␣␣␣␣is␣a␣[block␣quote](#block-quote)␣containing␣*Bs*. 71s 71s 2.␣␣**Laziness.**␣␣If␣a␣string␣of␣lines␣*Ls*␣constitute␣a␣[block 71s ␣␣␣␣quote](#block-quote)␣with␣contents␣*Bs*,␣then␣the␣result␣of␣deleting 71s ␣␣␣␣the␣initial␣[block␣quote␣marker](#block-quote-marker)␣from␣one␣or 71s ␣␣␣␣more␣lines␣in␣which␣the␣next␣non-space␣character␣after␣the␣[block 71s ␣␣␣␣quote␣marker](#block-quote-marker)␣is␣[paragraph␣continuation 71s ␣␣␣␣text](#paragraph-continuation-text)␣is␣a␣block␣quote␣with␣*Bs*␣as 71s ␣␣␣␣its␣content.␣␣ 71s ␣␣␣␣[Paragraph␣continuation␣text](#paragraph-continuation-text)␣is␣text 71s ␣␣␣␣that␣will␣be␣parsed␣as␣part␣of␣the␣content␣of␣a␣paragraph,␣but␣does 71s ␣␣␣␣not␣occur␣at␣the␣beginning␣of␣the␣paragraph. 71s 71s 3.␣␣**Consecutiveness.**␣␣A␣document␣cannot␣contain␣two␣[block 71s ␣␣␣␣quotes](#block-quote)␣in␣a␣row␣unless␣there␣is␣a␣[blank 71s ␣␣␣␣line](#blank-line)␣between␣them. 71s 71s Nothing␣else␣counts␣as␣a␣[block␣quote](#block-quote). 71s 71s Here␣is␣a␣simple␣example: 71s 71s  71s === expected =============== 71s >␣#␣Foo 71s >␣bar 71s >␣baz 71s  71s === got ==================== 71s 

Container␣blocks

71s

A␣container␣block␣is␣a␣block␣that␣has␣other 71s blocks␣as␣its␣contents.␣␣There␣are␣two␣basic␣kinds␣of␣container␣blocks: 71s block␣quotes␣and␣list␣items. 71s Lists␣are␣meta-containers␣for␣list␣items.

71s

We␣define␣the␣syntax␣for␣container␣blocks␣recursively.␣␣The␣general 71s form␣of␣the␣definition␣is:

71s
71s

If␣X␣is␣a␣sequence␣of␣blocks,␣then␣the␣result␣of 71s transforming␣X␣in␣such-and-such␣a␣way␣is␣a␣container␣of␣type␣Y 71s with␣these␣blocks␣as␣its␣content.

71s
71s

So,␣we␣explain␣what␣counts␣as␣a␣block␣quote␣or␣list␣item␣by␣explaining 71s how␣these␣can␣be␣generated␣from␣their␣contents.␣This␣should␣suffice 71s to␣define␣the␣syntax,␣although␣it␣does␣not␣give␣a␣recipe␣for␣parsing 71s these␣constructions.␣␣(A␣recipe␣is␣provided␣below␣in␣the␣section␣entitled 71s A␣parsing␣strategy.)

71s

Block␣quotes

71s

A␣block␣quote␣marker␣ 71s consists␣of␣0-3␣spaces␣of␣initial␣indent,␣plus␣(a)␣the␣character␣>␣together 71s with␣a␣following␣space,␣or␣(b)␣a␣single␣character␣>␣not␣followed␣by␣a␣space.

71s

The␣following␣rules␣define␣block␣quotes: 71s

71s
    71s
  1. Basic␣case.␣␣If␣a␣string␣of␣lines␣Ls␣constitute␣a␣sequence 71s of␣blocks␣Bs,␣then␣the␣result␣of␣appending␣a␣block␣quote 71s marker␣to␣the␣beginning␣of␣each␣line␣in␣Ls 71s is␣a␣block␣quote␣containing␣Bs.

  2. 71s
  3. Laziness.␣␣If␣a␣string␣of␣lines␣Ls␣constitute␣a␣block 71s quote␣with␣contents␣Bs,␣then␣the␣result␣of␣deleting 71s the␣initial␣block␣quote␣marker␣from␣one␣or 71s more␣lines␣in␣which␣the␣next␣non-space␣character␣after␣the␣block 71s quote␣marker␣is␣paragraph␣continuation 71s text␣is␣a␣block␣quote␣with␣Bs␣as 71s its␣content.␣␣ 71s Paragraph␣continuation␣text␣is␣text 71s that␣will␣be␣parsed␣as␣part␣of␣the␣content␣of␣a␣paragraph,␣but␣does 71s not␣occur␣at␣the␣beginning␣of␣the␣paragraph.

  4. 71s
  5. Consecutiveness.␣␣A␣document␣cannot␣contain␣two␣block 71s quotes␣in␣a␣row␣unless␣there␣is␣a␣blank 71s line␣between␣them.

  6. 71s
71s

Nothing␣else␣counts␣as␣a␣block␣quote.

71s

Here␣is␣a␣simple␣example:

71s 71s Test #129 71s cross 71s === markdown =============== 71s  71s The␣spaces␣after␣the␣`>`␣characters␣can␣be␣omitted: 71s 71s  71s === expected =============== 71s >#␣Foo 71s >bar 71s >␣baz 71s  71s === got ==================== 71s 

The␣spaces␣after␣the␣>␣characters␣can␣be␣omitted:

71s 71s Test #130 71s cross 71s === markdown =============== 71s  71s The␣`>`␣characters␣can␣be␣indented␣1-3␣spaces: 71s 71s  71s === expected =============== 71s ␣␣␣>␣#␣Foo 71s ␣␣␣>␣bar 71s ␣>␣baz 71s  71s === got ==================== 71s 

The␣>␣characters␣can␣be␣indented␣1-3␣spaces:

71s 71s Test #131 71s cross 71s === markdown =============== 71s  71s Four␣spaces␣gives␣us␣a␣code␣block: 71s 71s  71s === expected =============== 71s ␣␣␣␣>␣#␣Foo 71s ␣␣␣␣>␣bar 71s ␣␣␣␣>␣baz 71s  71s === got ==================== 71s 

Four␣spaces␣gives␣us␣a␣code␣block:

71s 71s Test #132 71s cross 71s === markdown =============== 71s  71s The␣Laziness␣clause␣allows␣us␣to␣omit␣the␣`>`␣before␣a 71s paragraph␣continuation␣line: 71s 71s  71s === expected =============== 71s >␣#␣Foo 71s >␣bar 71s baz 71s  71s === got ==================== 71s 

The␣Laziness␣clause␣allows␣us␣to␣omit␣the␣>␣before␣a 71s paragraph␣continuation␣line:

71s 71s Test #133 71s cross 71s === markdown =============== 71s  71s A␣block␣quote␣can␣contain␣some␣lazy␣and␣some␣non-lazy 71s continuation␣lines: 71s 71s  71s === expected =============== 71s >␣bar 71s baz 71s >␣foo 71s  71s === got ==================== 71s 

A␣block␣quote␣can␣contain␣some␣lazy␣and␣some␣non-lazy 71s continuation␣lines:

71s 71s Test #134 71s cross 71s === markdown =============== 71s  71s Laziness␣only␣applies␣to␣lines␣that␣are␣continuations␣of 71s paragraphs.␣Lines␣containing␣characters␣or␣indentation␣that␣indicate 71s block␣structure␣cannot␣be␣lazy. 71s 71s  71s === expected =============== 71s >␣foo 71s --- 71s  71s === got ==================== 71s 

Laziness␣only␣applies␣to␣lines␣that␣are␣continuations␣of 71s paragraphs.␣Lines␣containing␣characters␣or␣indentation␣that␣indicate 71s block␣structure␣cannot␣be␣lazy.

71s 71s Test #135 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s >␣-␣foo 71s -␣bar 71s  71s === got ==================== 71s  71s Test #136 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s >␣␣␣␣␣foo 71s ␣␣␣␣bar 71s  71s === got ==================== 71s  71s Test #137 71s cross 71s === markdown =============== 71s  71s  71s === expected =============== 71s >␣``` 71s foo 71s ``` 71s  71s === got ==================== 71s  71s Test #138 71s cross 71s === markdown =============== 71s  71s A␣block␣quote␣can␣be␣empty: 71s 71s  71s === expected =============== 71s  71s === got ==================== 71s 

A␣block␣quote␣can␣be␣empty:

71s 71s Test #139 71s cross 71s === markdown =============== 71s 
71s
71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
71s
71s 71s Test #140 71s cross 71s === markdown =============== 71s 
71s
71s  71s === expected =============== 71s  71s A␣block␣quote␣can␣have␣initial␣or␣final␣blank␣lines: 71s 71s  71s === got ==================== 71s 
71s
71s 71s Test #141 71s cross 71s === markdown =============== 71s 
71s

foo

71s
71s  71s === expected =============== 71s  71s A␣blank␣line␣always␣separates␣block␣quotes: 71s 71s  71s === got ==================== 71s 
71s

foo

71s
71s 71s Test #142 71s cross 71s === markdown =============== 71s 
71s

foo

71s
71s
71s

bar

71s
71s  71s === expected =============== 71s  71s (Most␣current␣Markdown␣implementations,␣including␣John␣Gruber's 71s original␣`Markdown.pl`,␣will␣parse␣this␣example␣as␣a␣single␣block␣quote 71s with␣two␣paragraphs.␣␣But␣it␣seems␣better␣to␣allow␣the␣author␣to␣decide 71s whether␣two␣block␣quotes␣or␣one␣are␣wanted.) 71s 71s Consecutiveness␣means␣that␣if␣we␣put␣these␣block␣quotes␣together, 71s we␣get␣a␣single␣block␣quote: 71s 71s  71s === got ==================== 71s 
71s

foo

71s
71s
71s

bar

71s
71s 71s Test #143 71s cross 71s === markdown =============== 71s 
71s

foo 71s bar

71s
71s  71s === expected =============== 71s  71s To␣get␣a␣block␣quote␣with␣two␣paragraphs,␣use: 71s 71s  71s === got ==================== 71s 
71s

foo 71s bar

71s
71s 71s Test #144 71s cross 71s === markdown =============== 71s 
71s

foo

71s

bar

71s
71s  71s === expected =============== 71s  71s Block␣quotes␣can␣interrupt␣paragraphs: 71s 71s  71s === got ==================== 71s 
71s

foo

71s

bar

71s
71s 71s Test #145 71s cross 71s === markdown =============== 71s 

foo

71s
71s

bar

71s
71s  71s === expected =============== 71s  71s In␣general,␣blank␣lines␣are␣not␣needed␣before␣or␣after␣block 71s quotes: 71s 71s  71s === got ==================== 71s 

foo

71s
71s

bar

71s
71s 71s Test #146 71s cross 71s === markdown =============== 71s 
71s

aaa

71s
71s 71s
71s

bbb

71s
71s  71s === expected =============== 71s  71s However,␣because␣of␣laziness,␣a␣blank␣line␣is␣needed␣between 71s a␣block␣quote␣and␣a␣following␣paragraph: 71s 71s  71s === got ==================== 71s 
71s

aaa

71s
71s 71s
71s

bbb

71s
71s 71s Test #147 71s cross 71s === markdown =============== 71s 
71s

bar 71s baz

71s
71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
71s

bar 71s baz

71s
71s 71s Test #148 71s cross 71s === markdown =============== 71s 
71s

bar

71s
71s

baz

71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
71s

bar

71s
71s

baz

71s 71s Test #149 71s cross 71s === markdown =============== 71s 
71s

bar

71s
71s

baz

71s  71s === expected =============== 71s  71s It␣is␣a␣consequence␣of␣the␣Laziness␣rule␣that␣any␣number 71s of␣initial␣`>`s␣may␣be␣omitted␣on␣a␣continuation␣line␣of␣a 71s nested␣block␣quote: 71s 71s  71s === got ==================== 71s 
71s

bar

71s
71s

baz

71s 71s Test #150 71s cross 71s === markdown =============== 71s 
71s
71s
71s

foo 71s bar

71s
71s
71s
71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
71s
71s
71s

foo 71s bar

71s
71s
71s
71s 71s Test #151 71s cross 71s === markdown =============== 71s 
71s
71s
71s

foo 71s bar 71s baz

71s
71s
71s
71s  71s === expected =============== 71s  71s When␣including␣an␣indented␣code␣block␣in␣a␣block␣quote, 71s remember␣that␣the␣[block␣quote␣marker](#block-quote-marker)␣includes 71s both␣the␣`>`␣and␣a␣following␣space.␣␣So␣*five␣spaces*␣are␣needed␣after 71s the␣`>`: 71s 71s  71s === got ==================== 71s 
71s
71s
71s

foo 71s bar 71s baz

71s
71s
71s
71s 71s Test #152 71s cross 71s === markdown =============== 71s 
71s
code
 71s 
71s
71s
71s

not␣code

71s
71s  71s === expected =============== 71s  71s 71s ##␣List␣items 71s 71s A␣[list␣marker](#list-marker)␣␣is␣a 71s [bullet␣list␣marker](#bullet-list-marker)␣or␣an␣[ordered␣list 71s marker](#ordered-list-marker). 71s 71s A␣[bullet␣list␣marker](#bullet-list-marker)␣ 71s is␣a␣`-`,␣`+`,␣or␣`*`␣character. 71s 71s An␣[ordered␣list␣marker](#ordered-list-marker)␣ 71s is␣a␣sequence␣of␣one␣of␣more␣digits␣(`0-9`),␣followed␣by␣either␣a 71s `.`␣character␣or␣a␣`)`␣character. 71s 71s The␣following␣rules␣define␣[list␣items](#list-item): 71s 71s 1.␣␣**Basic␣case.**␣␣If␣a␣sequence␣of␣lines␣*Ls*␣constitute␣a␣sequence␣of 71s ␣␣␣␣blocks␣*Bs*␣starting␣with␣a␣non-space␣character␣and␣not␣separated 71s ␣␣␣␣from␣each␣other␣by␣more␣than␣one␣blank␣line,␣and␣*M*␣is␣a␣list 71s ␣␣␣␣marker␣*M*␣of␣width␣*W*␣followed␣by␣0␣<␣*N*␣<␣5␣spaces,␣then␣the␣result 71s ␣␣␣␣of␣prepending␣*M*␣and␣the␣following␣spaces␣to␣the␣first␣line␣of 71s ␣␣␣␣*Ls*,␣and␣indenting␣subsequent␣lines␣of␣*Ls*␣by␣*W␣+␣N*␣spaces,␣is␣a 71s ␣␣␣␣list␣item␣with␣*Bs*␣as␣its␣contents.␣␣The␣type␣of␣the␣list␣item 71s ␣␣␣␣(bullet␣or␣ordered)␣is␣determined␣by␣the␣type␣of␣its␣list␣marker. 71s ␣␣␣␣If␣the␣list␣item␣is␣ordered,␣then␣it␣is␣also␣assigned␣a␣start 71s ␣␣␣␣number,␣based␣on␣the␣ordered␣list␣marker. 71s 71s For␣example,␣let␣*Ls*␣be␣the␣lines 71s 71s  71s === got ==================== 71s 
71s
code
 71s 
71s
71s
71s

not␣code

71s
71s 71s Test #153 71s cross 71s === markdown =============== 71s 

A␣paragraph 71s with␣two␣lines.

71s
indented␣code
 71s 
71s
71s

A␣block␣quote.

71s
71s  71s === expected =============== 71s  71s And␣let␣*M*␣be␣the␣marker␣`1.`,␣and␣*N*␣=␣2.␣␣Then␣rule␣#1␣says 71s that␣the␣following␣is␣an␣ordered␣list␣item␣with␣start␣number␣1, 71s and␣the␣same␣contents␣as␣*Ls*: 71s 71s  71s === got ==================== 71s 

A␣paragraph 71s with␣two␣lines.

71s
indented␣code
 71s 
71s
71s

A␣block␣quote.

71s
71s 71s Test #154 71s cross 71s === markdown =============== 71s 
    71s
  1. A␣paragraph 71s with␣two␣lines.

    71s
    indented␣code
     71s 
    71s
    71s

    A␣block␣quote.

    71s
  2. 71s
71s  71s === expected =============== 71s  71s The␣most␣important␣thing␣to␣notice␣is␣that␣the␣position␣of 71s the␣text␣after␣the␣list␣marker␣determines␣how␣much␣indentation 71s is␣needed␣in␣subsequent␣blocks␣in␣the␣list␣item.␣␣If␣the␣list 71s marker␣takes␣up␣two␣spaces,␣and␣there␣are␣three␣spaces␣between 71s the␣list␣marker␣and␣the␣next␣nonspace␣character,␣then␣blocks 71s must␣be␣indented␣five␣spaces␣in␣order␣to␣fall␣under␣the␣list 71s item. 71s 71s Here␣are␣some␣examples␣showing␣how␣far␣content␣must␣be␣indented␣to␣be 71s put␣under␣the␣list␣item: 71s 71s  71s === got ==================== 71s 
    71s
  1. A␣paragraph 71s with␣two␣lines.

    71s
    indented␣code
     71s 
    71s
    71s

    A␣block␣quote.

    71s
  2. 71s
71s 71s Test #155 71s cross 71s === markdown =============== 71s 
    71s
  • one
  • 71s
71s

two

71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
    71s
  • one
  • 71s
71s

two

71s 71s Test #156 71s cross 71s === markdown =============== 71s 
    71s
  • one

    71s

    two

  • 71s
71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
    71s
  • one

    71s

    two

  • 71s
71s 71s Test #157 71s cross 71s === markdown =============== 71s 
    71s
  • one
  • 71s
71s
␣two
 71s 
71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
    71s
  • one
  • 71s
71s
␣two
 71s 
71s 71s Test #158 71s cross 71s === markdown =============== 71s 
    71s
  • one

    71s

    two

  • 71s
71s  71s === expected =============== 71s  71s It␣is␣tempting␣to␣think␣of␣this␣in␣terms␣of␣columns:␣␣the␣continuation 71s blocks␣must␣be␣indented␣at␣least␣to␣the␣column␣of␣the␣first␣nonspace 71s character␣after␣the␣list␣marker.␣␣However,␣that␣is␣not␣quite␣right. 71s The␣spaces␣after␣the␣list␣marker␣determine␣how␣much␣relative␣indentation 71s is␣needed.␣␣Which␣column␣this␣indentation␣reaches␣will␣depend␣on 71s how␣the␣list␣item␣is␣embedded␣in␣other␣constructions,␣as␣shown␣by 71s this␣example: 71s 71s  71s === got ==================== 71s 
    71s
  • one

    71s

    two

  • 71s
71s 71s Test #159 71s cross 71s === markdown =============== 71s 
71s
71s
    71s
  1. one

    71s

    two

  2. 71s
71s
71s
71s  71s === expected =============== 71s  71s Here␣`two`␣occurs␣in␣the␣same␣column␣as␣the␣list␣marker␣`1.`, 71s but␣is␣actually␣contained␣in␣the␣list␣item,␣because␣there␣is 71s sufficent␣indentation␣after␣the␣last␣containing␣blockquote␣marker. 71s 71s The␣converse␣is␣also␣possible.␣␣In␣the␣following␣example,␣the␣word␣`two` 71s occurs␣far␣to␣the␣right␣of␣the␣initial␣text␣of␣the␣list␣item,␣`one`,␣but 71s it␣is␣not␣considered␣part␣of␣the␣list␣item,␣because␣it␣is␣not␣indented 71s far␣enough␣past␣the␣blockquote␣marker: 71s 71s  71s === got ==================== 71s 
71s
71s
    71s
  1. one

    71s

    two

  2. 71s
71s
71s
71s 71s Test #160 71s cross 71s === markdown =============== 71s 
71s
71s
    71s
  • one
  • 71s
71s

two

71s
71s
71s  71s === expected =============== 71s  71s A␣list␣item␣may␣not␣contain␣blocks␣that␣are␣separated␣by␣more␣than 71s one␣blank␣line.␣␣Thus,␣two␣blank␣lines␣will␣end␣a␣list,␣unless␣the 71s two␣blanks␣are␣contained␣in␣a␣[fenced␣code␣block](#fenced-code-block). 71s 71s  71s === got ==================== 71s 
71s
71s
    71s
  • one
  • 71s
71s

two

71s
71s
71s 71s Test #161 71s cross 71s === markdown =============== 71s 
    71s
  • foo

    71s

    bar

  • 71s
  • foo

  • 71s
71s

bar

71s
    71s
  • foo
     71s 
     71s 
     71s bar
     71s 
  • 71s
71s  71s === expected =============== 71s  71s A␣list␣item␣may␣contain␣any␣kind␣of␣block: 71s 71s  71s === got ==================== 71s 
    71s
  • foo

    71s

    bar

  • 71s
  • foo

  • 71s
71s

bar

71s
    71s
  • foo
     71s 

    bar 71s

  • 71s
71s 71s Test #162 71s cross 71s === markdown =============== 71s 
    71s
  1. foo

    71s
    bar
     71s 
    71s

    baz

    71s
    71s

    bam

    71s
  2. 71s
71s  71s === expected =============== 71s  71s 2.␣␣**Item␣starting␣with␣indented␣code.**␣␣If␣a␣sequence␣of␣lines␣*Ls* 71s ␣␣␣␣constitute␣a␣sequence␣of␣blocks␣*Bs*␣starting␣with␣an␣indented␣code 71s ␣␣␣␣block␣and␣not␣separated␣from␣each␣other␣by␣more␣than␣one␣blank␣line, 71s ␣␣␣␣and␣*M*␣is␣a␣list␣marker␣*M*␣of␣width␣*W*␣followed␣by 71s ␣␣␣␣one␣space,␣then␣the␣result␣of␣prepending␣*M*␣and␣the␣following 71s ␣␣␣␣space␣to␣the␣first␣line␣of␣*Ls*,␣and␣indenting␣subsequent␣lines␣of 71s ␣␣␣␣*Ls*␣by␣*W␣+␣1*␣spaces,␣is␣a␣list␣item␣with␣*Bs*␣as␣its␣contents. 71s ␣␣␣␣If␣a␣line␣is␣empty,␣then␣it␣need␣not␣be␣indented.␣␣The␣type␣of␣the 71s ␣␣␣␣list␣item␣(bullet␣or␣ordered)␣is␣determined␣by␣the␣type␣of␣its␣list 71s ␣␣␣␣marker.␣␣If␣the␣list␣item␣is␣ordered,␣then␣it␣is␣also␣assigned␣a 71s ␣␣␣␣start␣number,␣based␣on␣the␣ordered␣list␣marker. 71s 71s An␣indented␣code␣block␣will␣have␣to␣be␣indented␣four␣spaces␣beyond 71s the␣edge␣of␣the␣region␣where␣text␣will␣be␣included␣in␣the␣list␣item. 71s In␣the␣following␣case␣that␣is␣6␣spaces: 71s 71s  71s === got ==================== 71s 
    71s
  1. foo

    71s
    bar
     71s 
    71s

    baz

    71s
    71s

    bam

    71s
  2. 71s
71s 71s Test #163 71s cross 71s === markdown =============== 71s 
    71s
  • foo

    71s
    bar
     71s 
  • 71s
71s  71s === expected =============== 71s  71s And␣in␣this␣case␣it␣is␣11␣spaces: 71s 71s  71s === got ==================== 71s 
    71s
  • foo

    71s
    bar
     71s 
  • 71s
71s 71s Test #164 71s cross 71s === markdown =============== 71s  71s
  • foo

    71s
    bar
     71s 
  • 71s 71s  71s === expected =============== 71s  71s If␣the␣*first*␣block␣in␣the␣list␣item␣is␣an␣indented␣code␣block, 71s then␣by␣rule␣#2,␣the␣contents␣must␣be␣indented␣*one*␣space␣after␣the 71s list␣marker: 71s 71s  71s === got ==================== 71s  71s
  • foo

    71s
    bar
     71s 
  • 71s 71s 71s Test #165 71s cross 71s === markdown =============== 71s 
    indented␣code
     71s 
    71s

    paragraph

    71s
    more␣code
     71s 
    71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
    indented␣code
     71s 
    71s

    paragraph

    71s
    more␣code
     71s 
    71s 71s Test #166 71s cross 71s === markdown =============== 71s 
      71s
    1. indented␣code
       71s 
      71s

      paragraph

      71s
      more␣code
       71s 
    2. 71s
    71s  71s === expected =============== 71s  71s Note␣that␣an␣additional␣space␣indent␣is␣interpreted␣as␣space 71s inside␣the␣code␣block: 71s 71s  71s === got ==================== 71s 
      71s
    1. indented␣code
       71s 
      71s

      paragraph

      71s
      more␣code
       71s 
    2. 71s
    71s 71s Test #167 71s cross 71s === markdown =============== 71s 
      71s
    1. ␣indented␣code
       71s 
      71s

      paragraph

      71s
      more␣code
       71s 
    2. 71s
    71s  71s === expected =============== 71s  71s Note␣that␣rules␣#1␣and␣#2␣only␣apply␣to␣two␣cases:␣␣(a)␣cases 71s in␣which␣the␣lines␣to␣be␣included␣in␣a␣list␣item␣begin␣with␣a␣nonspace 71s character,␣and␣(b)␣cases␣in␣which␣they␣begin␣with␣an␣indented␣code 71s block.␣␣In␣a␣case␣like␣the␣following,␣where␣the␣first␣block␣begins␣with 71s a␣three-space␣indent,␣the␣rules␣do␣not␣allow␣us␣to␣form␣a␣list␣item␣by 71s indenting␣the␣whole␣thing␣and␣prepending␣a␣list␣marker: 71s 71s  71s === got ==================== 71s 
      71s
    1. ␣indented␣code
       71s 
      71s

      paragraph

      71s
      more␣code
       71s 
    2. 71s
    71s 71s Test #168 71s cross 71s === markdown =============== 71s 

    foo

    71s

    bar

    71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 

    foo

    71s

    bar

    71s 71s Test #169 71s cross 71s === markdown =============== 71s 
      71s
    • foo
    • 71s
    71s

    bar

    71s  71s === expected =============== 71s  71s This␣is␣not␣a␣significant␣restriction,␣because␣when␣a␣block␣begins 71s with␣1-3␣spaces␣indent,␣the␣indentation␣can␣always␣be␣removed␣without 71s a␣change␣in␣interpretation,␣allowing␣rule␣#1␣to␣be␣applied.␣␣So,␣in 71s the␣above␣case: 71s 71s  71s === got ==================== 71s 
      71s
    • foo
    • 71s
    71s

    bar

    71s 71s Test #170 71s cross 71s === markdown =============== 71s 
      71s
    • foo

      71s

      bar

    • 71s
    71s  71s === expected =============== 71s  71s 71s 3.␣␣**Indentation.**␣␣If␣a␣sequence␣of␣lines␣*Ls*␣constitutes␣a␣list␣item 71s ␣␣␣␣according␣to␣rule␣#1␣or␣#2,␣then␣the␣result␣of␣indenting␣each␣line 71s ␣␣␣␣of␣*L*␣by␣1-3␣spaces␣(the␣same␣for␣each␣line)␣also␣constitutes␣a 71s ␣␣␣␣list␣item␣with␣the␣same␣contents␣and␣attributes.␣␣If␣a␣line␣is 71s ␣␣␣␣empty,␣then␣it␣need␣not␣be␣indented. 71s 71s Indented␣one␣space: 71s 71s  71s === got ==================== 71s 
      71s
    • foo

      71s

      bar

    • 71s
    71s 71s Test #171 71s cross 71s === markdown =============== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s  71s === expected =============== 71s  71s Indented␣two␣spaces: 71s 71s  71s === got ==================== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s 71s Test #172 71s cross 71s === markdown =============== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s  71s === expected =============== 71s  71s Indented␣three␣spaces: 71s 71s  71s === got ==================== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s 71s Test #173 71s cross 71s === markdown =============== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s  71s === expected =============== 71s  71s Four␣spaces␣indent␣gives␣a␣code␣block: 71s 71s  71s === got ==================== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s 71s Test #174 71s cross 71s === markdown =============== 71s 
    1.␣␣A␣paragraph
     71s ␣␣␣␣with␣two␣lines.
     71s 
     71s ␣␣␣␣␣␣␣␣indented␣code
     71s 
     71s ␣␣␣␣>␣A␣block␣quote.
     71s 
    71s  71s === expected =============== 71s  71s 71s 4.␣␣**Laziness.**␣␣If␣a␣string␣of␣lines␣*Ls*␣constitute␣a␣[list 71s ␣␣␣␣item](#list-item)␣with␣contents␣*Bs*,␣then␣the␣result␣of␣deleting 71s ␣␣␣␣some␣or␣all␣of␣the␣indentation␣from␣one␣or␣more␣lines␣in␣which␣the 71s ␣␣␣␣next␣non-space␣character␣after␣the␣indentation␣is 71s ␣␣␣␣[paragraph␣continuation␣text](#paragraph-continuation-text)␣is␣a 71s ␣␣␣␣list␣item␣with␣the␣same␣contents␣and␣attributes. 71s 71s Here␣is␣an␣example␣with␣lazy␣continuation␣lines: 71s 71s  71s === got ==================== 71s 
    1.␣␣A␣paragraph
     71s ␣␣␣␣with␣two␣lines.
     71s 
    ␣␣␣␣indented␣code
     71s 
     71s &gt;␣A␣block␣quote.
     71s 
    71s

    71s 71s Test #175 71s cross 71s === markdown =============== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s  71s === expected =============== 71s  71s Indentation␣can␣be␣partially␣deleted: 71s 71s  71s === got ==================== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.

      71s
      indented␣code
       71s 
      71s
      71s

      A␣block␣quote.

      71s
    2. 71s
    71s 71s Test #176 71s cross 71s === markdown =============== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.
    2. 71s
    71s  71s === expected =============== 71s  71s These␣examples␣show␣how␣laziness␣can␣work␣in␣nested␣structures: 71s 71s  71s === got ==================== 71s 
      71s
    1. A␣paragraph 71s with␣two␣lines.
    2. 71s
    71s 71s Test #177 71s cross 71s === markdown =============== 71s 
    71s
      71s
    1. 71s

      Blockquote 71s continued␣here.

      71s
    2. 71s
    71s
    71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
    71s
      71s
    1. 71s

      Blockquote 71s continued␣here.

      71s
    2. 71s
    71s
    71s 71s Test #178 71s cross 71s === markdown =============== 71s 
    71s
      71s
    1. 71s

      Blockquote 71s continued␣here.

      71s
    2. 71s
    71s
    71s  71s === expected =============== 71s  71s 71s 5.␣␣**That's␣all.**␣Nothing␣that␣is␣not␣counted␣as␣a␣list␣item␣by␣rules 71s ␣␣␣␣#1--4␣counts␣as␣a␣[list␣item](#list-item). 71s 71s The␣rules␣for␣sublists␣follow␣from␣the␣general␣rules␣above.␣␣A␣sublist 71s must␣be␣indented␣the␣same␣number␣of␣spaces␣a␣paragraph␣would␣need␣to␣be 71s in␣order␣to␣be␣included␣in␣the␣list␣item. 71s 71s So,␣in␣this␣case␣we␣need␣two␣spaces␣indent: 71s 71s  71s === got ==================== 71s 
    71s
      71s
    1. 71s

      Blockquote 71s continued␣here.

      71s
    2. 71s
    71s
    71s 71s Test #179 71s cross 71s === markdown =============== 71s 
      71s
    • foo 71s
        71s
      • bar 71s
          71s
        • baz
        • 71s
      • 71s
    • 71s
    71s  71s === expected =============== 71s  71s One␣is␣not␣enough: 71s 71s  71s === got ==================== 71s 
      71s
    • foo 71s
        71s
      • bar 71s
          71s
        • baz
        • 71s
      • 71s
    • 71s
    71s 71s Test #180 71s cross 71s === markdown =============== 71s 
      71s
    • foo
    • 71s
    • bar
    • 71s
    • baz
    • 71s
    71s  71s === expected =============== 71s  71s Here␣we␣need␣four,␣because␣the␣list␣marker␣is␣wider: 71s 71s  71s === got ==================== 71s 
      71s
    • foo
    • 71s
    • bar
    • 71s
    • baz
    • 71s
    71s 71s Test #181 71s cross 71s === markdown =============== 71s  71s
  • foo 71s
      71s
    • bar
    • 71s
  • 71s 71s  71s === expected =============== 71s  71s Three␣is␣not␣enough: 71s 71s  71s === got ==================== 71s  71s
  • foo 71s
      71s
    • bar
    • 71s
  • 71s 71s 71s Test #182 71s cross 71s === markdown =============== 71s  71s
  • foo
  • 71s 71s
      71s
    • bar
    • 71s
    71s  71s === expected =============== 71s  71s A␣list␣may␣be␣the␣first␣block␣in␣a␣list␣item: 71s 71s  71s === got ==================== 71s  71s
  • foo
  • 71s 71s
      71s
    • bar
    • 71s
    71s 71s Test #183 71s cross 71s === markdown =============== 71s 
      71s
      • 71s
      • foo
      • 71s
    • 71s
    71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
      71s
      • 71s
      • foo
      • 71s
    • 71s
    71s 71s Test #184 71s cross 71s === markdown =============== 71s 
      71s
      • 71s
      • 71s
      • foo
      • 71s
    71s 71s 71s  71s === expected =============== 71s  71s A␣list␣item␣may␣be␣empty: 71s 71s  71s === got ==================== 71s 
      71s
      • 71s
      • 71s
      • foo
      • 71s
    71s 71s 71s 71s Test #185 71s cross 71s === markdown =============== 71s 
      71s
    • foo
    • 71s
    • 71s
    • bar
    • 71s
    71s  71s === expected =============== 71s  71s  71s === got ==================== 71s 
      71s
    • foo
    • 71s
    • 71s
    • bar
    • 71s
    71s 71s Test #186 71s cross 71s === markdown =============== 71s 
      71s
    • 71s
    71s  71s === expected =============== 71s  71s ###␣Motivation 71s 71s John␣Gruber's␣Markdown␣spec␣says␣the␣following␣about␣list␣items: 71s 71s 1.␣"List␣markers␣typically␣start␣at␣the␣left␣margin,␣but␣may␣be␣indented 71s ␣␣␣by␣up␣to␣three␣spaces.␣List␣markers␣must␣be␣followed␣by␣one␣or␣more 71s ␣␣␣spaces␣or␣a␣tab." 71s 71s 2.␣"To␣make␣lists␣look␣nice,␣you␣can␣wrap␣items␣with␣hanging␣indents.... 71s ␣␣␣But␣if␣you␣don't␣want␣to,␣you␣don't␣have␣to." 71s 71s 3.␣"List␣items␣may␣consist␣of␣multiple␣paragraphs.␣Each␣subsequent 71s ␣␣␣paragraph␣in␣a␣list␣item␣must␣be␣indented␣by␣either␣4␣spaces␣or␣one 71s ␣␣␣tab." 71s 71s 4.␣"It␣looks␣nice␣if␣you␣indent␣every␣line␣of␣the␣subsequent␣paragraphs, 71s ␣␣␣but␣here␣again,␣Markdown␣will␣allow␣you␣to␣be␣lazy." 71s 71s 5.␣"To␣put␣a␣blockquote␣within␣a␣list␣item,␣the␣blockquote's␣`>` 71s ␣␣␣delimiters␣need␣to␣be␣indented." 71s 71s 6.␣"To␣put␣a␣code␣block␣within␣a␣list␣item,␣the␣code␣block␣needs␣to␣be 71s ␣␣␣indented␣twice␣—␣8␣spaces␣or␣two␣tabs." 71s 71s These␣rules␣specify␣that␣a␣paragraph␣under␣a␣list␣item␣must␣be␣indented 71s four␣spaces␣(presumably,␣from␣the␣left␣margin,␣rather␣than␣the␣start␣of 71s the␣list␣marker,␣but␣this␣is␣not␣said),␣and␣that␣code␣under␣a␣list␣item 71s must␣be␣indented␣eight␣spaces␣instead␣of␣the␣usual␣four.␣␣They␣also␣say 71s that␣a␣block␣quote␣must␣be␣indented,␣but␣not␣by␣how␣much;␣however,␣the 71s example␣given␣has␣four␣spaces␣indentation.␣␣Although␣nothing␣is␣said 71s about␣other␣kinds␣of␣block-level␣content,␣it␣is␣certainly␣reasonable␣to 71s infer␣that␣*all*␣block␣elements␣under␣a␣list␣item,␣including␣other 71s lists,␣must␣be␣indented␣four␣spaces.␣␣This␣principle␣has␣been␣called␣the 71s *four-space␣rule*. 71s 71s The␣four-space␣rule␣is␣clear␣and␣principled,␣and␣if␣the␣reference 71s implementation␣`Markdown.pl`␣had␣followed␣it,␣it␣probably␣would␣have 71s become␣the␣standard.␣␣However,␣`Markdown.pl`␣allowed␣paragraphs␣and 71s sublists␣to␣start␣with␣only␣two␣spaces␣indentation,␣at␣least␣on␣the 71s outer␣level.␣␣Worse,␣its␣behavior␣was␣inconsistent:␣a␣sublist␣of␣an 71s outer-level␣list␣needed␣two␣spaces␣indentation,␣but␣a␣sublist␣of␣this 71s sublist␣needed␣three␣spaces.␣␣It␣is␣not␣surprising,␣then,␣that␣different 71s implementations␣of␣Markdown␣have␣developed␣very␣different␣rules␣for 71s determining␣what␣comes␣under␣a␣list␣item.␣␣(Pandoc␣and␣python-Markdown, 71s for␣example,␣stuck␣with␣Gruber's␣syntax␣description␣and␣the␣four-space 71s rule,␣while␣discount,␣redcarpet,␣marked,␣PHP␣Markdown,␣and␣others 71s followed␣`Markdown.pl`'s␣behavior␣more␣closely.) 71s 71s Unfortunately,␣given␣the␣divergences␣between␣implementations,␣there 71s is␣no␣way␣to␣give␣a␣spec␣for␣list␣items␣that␣will␣be␣guaranteed␣not 71s to␣break␣any␣existing␣documents.␣␣However,␣the␣spec␣given␣here␣should 71s correctly␣handle␣lists␣formatted␣with␣either␣the␣four-space␣rule␣or 71s the␣more␣forgiving␣`Markdown.pl`␣behavior,␣provided␣they␣are␣laid␣out 71s in␣a␣way␣that␣is␣natural␣for␣a␣human␣to␣read. 71s 71s The␣strategy␣here␣is␣to␣let␣the␣width␣and␣indentation␣of␣the␣list␣marker 71s determine␣the␣indentation␣necessary␣for␣blocks␣to␣fall␣under␣the␣list 71s item,␣rather␣than␣having␣a␣fixed␣and␣arbitrary␣number.␣␣The␣writer␣can 71s think␣of␣the␣body␣of␣the␣list␣item␣as␣a␣unit␣which␣gets␣indented␣to␣the 71s right␣enough␣to␣fit␣the␣list␣marker␣(and␣any␣indentation␣on␣the␣list 71s marker).␣␣(The␣laziness␣rule,␣#4,␣then␣allows␣continuation␣lines␣to␣be 71s unindented␣if␣needed.) 71s 71s This␣rule␣is␣superior,␣we␣claim,␣to␣any␣rule␣requiring␣a␣fixed␣level␣of 71s indentation␣from␣the␣margin.␣␣The␣four-space␣rule␣is␣clear␣but 71s unnatural.␣It␣is␣quite␣unintuitive␣that 71s 71s ```␣markdown 71s -␣foo 71s 71s ␣␣bar 71s 71s ␣␣-␣baz 71s ``` 71s 71s should␣be␣parsed␣as␣two␣lists␣with␣an␣intervening␣paragraph, 71s 71s ```␣html 71s
      71s
    • foo
    • 71s
    71s

    bar

    71s
      71s
    • baz
    • 71s
    71s ``` 71s 71s as␣the␣four-space␣rule␣demands,␣rather␣than␣a␣single␣list, 71s 71s ```␣html 71s
      71s
    • foo

      71s

      bar

      71s
        71s
      • baz
      • 71s
    • 71s
    71s ``` 71s 71s The␣choice␣of␣four␣spaces␣is␣arbitrary.␣␣It␣can␣be␣learned,␣but␣it␣is 71s not␣likely␣to␣be␣guessed,␣and␣it␣trips␣up␣beginners␣regularly. 71s 71s Would␣it␣help␣to␣adopt␣a␣two-space␣rule?␣␣The␣problem␣is␣that␣such 71s a␣rule,␣together␣with␣the␣rule␣allowing␣1--3␣spaces␣indentation␣of␣the 71s initial␣list␣marker,␣allows␣text␣that␣is␣indented␣*less␣than*␣the 71s original␣list␣marker␣to␣be␣included␣in␣the␣list␣item.␣For␣example, 71s `Markdown.pl`␣parses 71s 71s ```␣markdown 71s ␣␣␣-␣one 71s 71s ␣␣two 71s ``` 71s 71s as␣a␣single␣list␣item,␣with␣`two`␣a␣continuation␣paragraph: 71s 71s ```␣html 71s
      71s
    • one

      71s

      two

    • 71s
    71s ``` 71s 71s and␣similarly 71s 71s ```␣markdown 71s >␣␣␣-␣one 71s  71s === got ==================== 71s 
      71s
    • 71s
    71s 71s [Lists] 71s Test #187 71s tick 71s Test #188 71s tick 71s Test #189 71s tick 71s Test #190 71s tick 71s Test #191 71s tick 71s Test #192 71s tick 71s Test #193 71s tick 71s Test #194 71s tick 71s Test #195 71s tick 71s Test #196 71s tick 71s Test #197 71s tick 71s Test #198 71s tick 71s Test #199 71s tick 71s Test #200 71s tick 71s Test #201 71s tick 71s Test #202 71s tick 71s Test #203 71s tick 71s Test #204 71s tick 71s Test #205 71s tick 71s Test #206 71s tick 71s [Inlines] 71s Test #207 71s tick 71s [Backslash escapes] 71s Test #208 71s tick 71s Test #209 71s tick 71s Test #210 71s tick 71s Test #211 71s tick 71s Test #212 71s tick 71s Test #213 71s tick 71s Test #214 71s tick 71s Test #215 71s tick 71s Test #216 71s tick 71s Test #217 71s tick 71s Test #218 71s tick 71s Test #219 71s tick 71s Test #220 71s tick 71s [Entities] 71s Test #221 71s tick 71s Test #222 71s tick 71s Test #223 71s tick 71s Test #224 71s tick 71s Test #225 71s tick 71s Test #226 71s tick 71s Test #227 71s tick 71s Test #228 71s tick 71s Test #229 71s tick 71s Test #230 71s tick 71s Test #231 71s tick 71s Test #232 71s tick 71s [Code span] 71s Test #233 71s tick 71s Test #234 71s tick 71s Test #235 71s tick 71s Test #236 71s tick 71s Test #237 71s tick 71s Test #238 71s tick 71s Test #239 71s tick 71s Test #240 71s tick 71s Test #241 71s tick 71s Test #242 71s tick 71s Test #243 71s tick 71s Test #244 71s tick 71s Test #245 71s tick 71s [Emphasis and strong emphasis] 71s Test #246 71s tick 71s Test #247 71s tick 71s Test #248 71s tick 71s Test #249 71s tick 71s Test #250 71s tick 71s Test #251 71s tick 71s Test #252 71s tick 71s Test #253 71s tick 71s Test #254 71s tick 71s Test #255 71s tick 71s Test #256 71s tick 71s Test #257 71s tick 71s Test #258 71s tick 71s Test #259 71s tick 71s Test #260 71s tick 71s Test #261 71s tick 71s Test #262 71s tick 71s Test #263 71s tick 71s Test #264 71s tick 71s Test #265 71s tick 71s Test #266 71s tick 71s Test #267 71s tick 71s Test #268 71s tick 71s Test #269 71s tick 71s Test #270 71s tick 71s Test #271 71s tick 71s Test #272 71s tick 71s Test #273 71s tick 71s Test #274 71s tick 71s Test #275 71s tick 71s Test #276 71s tick 71s Test #277 71s tick 71s Test #278 71s tick 71s Test #279 71s tick 71s Test #280 71s tick 71s Test #281 71s tick 71s Test #282 71s tick 71s Test #283 71s tick 71s Test #284 71s tick 71s Test #285 71s tick 71s Test #286 71s tick 71s Test #287 71s tick 71s Test #288 71s tick 71s Test #289 71s tick 71s Test #290 71s tick 71s Test #291 71s tick 71s Test #292 71s tick 71s Test #293 71s tick 71s Test #294 71s tick 71s Test #295 71s tick 71s Test #296 71s tick 71s Test #297 71s tick 71s Test #298 71s tick 71s Test #299 71s tick 71s Test #300 71s tick 71s Test #301 71s tick 71s Test #302 71s tick 71s Test #303 71s tick 71s Test #304 71s tick 71s Test #305 71s tick 71s Test #306 71s tick 71s Test #307 71s tick 71s Test #308 71s tick 71s Test #309 71s tick 71s Test #310 71s tick 71s Test #311 71s tick 71s Test #312 71s tick 71s Test #313 71s tick 71s Test #314 71s tick 71s Test #315 71s tick 71s Test #316 71s tick 71s Test #317 71s tick 71s Test #318 71s tick 71s Test #319 71s tick 71s Test #320 71s tick 71s Test #321 71s tick 71s Test #322 71s tick 71s Test #323 71s tick 71s Test #324 71s tick 71s Test #325 71s tick 71s Test #326 71s tick 71s Test #327 71s tick 71s [Links] 71s Test #328 71s tick 71s Test #329 71s tick 71s Test #330 71s tick 71s Test #331 71s tick 71s Test #332 71s tick 71s Test #333 71s tick 71s Test #334 71s tick 71s Test #335 71s tick 71s Test #336 71s tick 71s Test #337 71s tick 71s Test #338 71s tick 71s Test #339 71s tick 71s Test #340 71s tick 71s Test #341 71s tick 71s Test #342 71s tick 71s Test #343 71s tick 71s Test #344 71s tick 71s Test #345 71s tick 71s Test #346 71s tick 71s Test #347 71s tick 71s Test #348 71s tick 71s Test #349 71s tick 71s Test #350 71s tick 71s Test #351 71s tick 71s Test #352 71s tick 71s Test #353 71s tick 71s Test #354 71s tick 71s Test #355 71s tick 71s Test #356 71s tick 71s Test #357 71s tick 71s Test #358 71s tick 71s Test #359 71s tick 71s Test #360 71s tick 71s Test #361 71s tick 71s Test #362 71s tick 71s Test #363 71s tick 71s Test #364 71s tick 71s Test #365 71s tick 71s Test #366 71s tick 71s Test #367 71s tick 71s Test #368 71s tick 71s Test #369 71s tick 71s Test #370 71s tick 71s Test #371 71s tick 71s Test #372 71s tick 71s Test #373 71s tick 71s Test #374 71s tick 71s Test #375 71s tick 71s [Images] 71s Test #376 71s tick 71s Test #377 71s tick 71s Test #378 71s tick 71s Test #379 71s tick 71s Test #380 71s tick 71s Test #381 71s tick 71s Test #382 71s tick 71s Test #383 71s tick 71s Test #384 71s tick 71s Test #385 71s tick 71s Test #386 71s tick 71s Test #387 71s tick 71s Test #388 71s tick 71s Test #389 71s tick 71s Test #390 71s tick 71s Test #391 71s tick 71s Test #392 71s tick 71s Test #393 71s tick 71s Test #394 71s tick 71s Test #395 71s tick 71s [Autolinks] 71s Test #396 71s tick 71s Test #397 71s tick 71s Test #398 71s tick 71s Test #399 71s tick 71s Test #400 71s tick 71s Test #401 71s tick 71s Test #402 71s tick 71s Test #403 71s tick 71s Test #404 71s tick 71s Test #405 71s tick 71s Test #406 71s tick 71s Test #407 71s tick 71s Test #408 71s tick 71s Test #409 71s tick 71s [Raw HTML] 71s Test #410 71s tick 71s Test #411 71s tick 71s Test #412 71s tick 71s Test #413 71s tick 71s Test #414 71s tick 71s Test #415 71s tick 71s Test #416 71s tick 71s Test #417 71s tick 71s Test #418 71s tick 71s Test #419 71s tick 71s Test #420 71s tick 71s Test #421 71s tick 71s Test #422 71s tick 71s Test #423 71s tick 71s Test #424 71s tick 71s Test #425 71s tick 71s Test #426 71s tick 71s Test #427 71s tick 71s Test #428 71s tick 71s [Hard line breaks] 71s Test #429 71s tick 71s Test #430 71s tick 71s Test #431 71s tick 71s Test #432 71s tick 71s Test #433 71s tick 71s Test #434 71s tick 71s Test #435 71s tick 71s Test #436 71s tick 71s Test #437 71s tick 71s Test #438 71s tick 71s Test #439 71s tick 71s [Soft line breaks] 71s Test #440 71s tick 71s Test #441 71s tick 71s [Strings] 71s Test #442 71s tick 71s Test #443 71s tick 71s Test #444 71s tick 71s 349 tests passed, 95 failed 71s runtime: 0.07184010600000001s 71s autopkgtest [16:21:10]: test command1: -----------------------] 71s autopkgtest [16:21:10]: test command1: - - - - - - - - - - results - - - - - - - - - - 71s command1 PASS 72s autopkgtest [16:21:11]: @@@@@@@@@@@@@@@@@@@@ summary 72s command1 PASS