I: pbuilder: network access will be disabled during build I: Current time: Wed Mar 13 08:15:52 +14 2024 I: pbuilder-time-stamp: 1710267352 I: Building the build Environment I: extracting base tarball [/var/cache/pbuilder/unstable-reproducible-base.tgz] I: copying local configuration W: --override-config is not set; not updating apt.conf Read the manpage for details. I: mounting /proc filesystem I: mounting /sys filesystem I: creating /{dev,run}/shm I: mounting /dev/pts filesystem I: redirecting /dev/ptmx to /dev/pts/ptmx I: policy-rc.d already exists I: Copying source file I: copying [commonmark-bkrs_0.5.4+ds-7.1.dsc] I: copying [./commonmark-bkrs_0.5.4+ds.orig.tar.xz] I: copying [./commonmark-bkrs_0.5.4+ds-7.1.debian.tar.xz] I: Extracting source gpgv: Signature made Thu Feb 8 00:40:02 2024 gpgv: using RSA key D56571B88A8BBAF140BF63D6BD7EAA60778FA6F5 gpgv: issuer "doko@debian.org" gpgv: Can't check signature: No public key dpkg-source: warning: cannot verify inline signature for ./commonmark-bkrs_0.5.4+ds-7.1.dsc: no acceptable signature found dpkg-source: info: extracting commonmark-bkrs in commonmark-bkrs-0.5.4+ds dpkg-source: info: unpacking commonmark-bkrs_0.5.4+ds.orig.tar.xz dpkg-source: info: unpacking commonmark-bkrs_0.5.4+ds-7.1.debian.tar.xz dpkg-source: info: using patch list from debian/patches/series dpkg-source: info: applying upstream-fix-deprecation-HTMLunescape.patch dpkg-source: info: applying upstream-fix-deprecation-time.patch dpkg-source: info: applying debianization.patch dpkg-source: info: applying python3.12.diff I: Not using root during the build. I: Installing the build-deps I: user script /srv/workspace/pbuilder/7282/tmp/hooks/D01_modify_environment starting debug: Running on virt32a. I: Changing host+domainname to test build reproducibility I: Adding a custom variable just for the fun of it... I: Changing /bin/sh to bash '/bin/sh' -> '/bin/bash' lrwxrwxrwx 1 root root 9 Mar 12 18:16 /bin/sh -> /bin/bash I: Setting pbuilder2's login shell to /bin/bash I: Setting pbuilder2's GECOS to second user,second room,second work-phone,second home-phone,second other I: user script /srv/workspace/pbuilder/7282/tmp/hooks/D01_modify_environment finished I: user script /srv/workspace/pbuilder/7282/tmp/hooks/D02_print_environment starting I: set BASH=/bin/sh BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:globskipdots:hostcomplete:interactive_comments:patsub_replacement:progcomp:promptvars:sourcepath BASH_ALIASES=() BASH_ARGC=() BASH_ARGV=() BASH_CMDS=() BASH_LINENO=([0]="12" [1]="0") BASH_LOADABLES_PATH=/usr/local/lib/bash:/usr/lib/bash:/opt/local/lib/bash:/usr/pkg/lib/bash:/opt/pkg/lib/bash:. BASH_SOURCE=([0]="/tmp/hooks/D02_print_environment" [1]="/tmp/hooks/D02_print_environment") BASH_VERSINFO=([0]="5" [1]="2" [2]="21" [3]="1" [4]="release" [5]="arm-unknown-linux-gnueabihf") BASH_VERSION='5.2.21(1)-release' BUILDDIR=/build/reproducible-path BUILDUSERGECOS='second user,second room,second work-phone,second home-phone,second other' BUILDUSERNAME=pbuilder2 BUILD_ARCH=armhf DEBIAN_FRONTEND=noninteractive DEB_BUILD_OPTIONS='buildinfo=+all reproducible=+all parallel=4 ' DIRSTACK=() DISTRIBUTION=unstable EUID=0 FUNCNAME=([0]="Echo" [1]="main") GROUPS=() HOME=/root HOSTNAME=i-capture-the-hostname HOSTTYPE=arm HOST_ARCH=armhf IFS=' ' INVOCATION_ID=755ffa3725a144448ce376a603bc6ab2 LANG=C LANGUAGE=it_CH:it LC_ALL=C MACHTYPE=arm-unknown-linux-gnueabihf MAIL=/var/mail/root OPTERR=1 OPTIND=1 OSTYPE=linux-gnueabihf PATH=/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path PBCURRENTCOMMANDLINEOPERATION=build PBUILDER_OPERATION=build PBUILDER_PKGDATADIR=/usr/share/pbuilder PBUILDER_PKGLIBDIR=/usr/lib/pbuilder PBUILDER_SYSCONFDIR=/etc PIPESTATUS=([0]="0") POSIXLY_CORRECT=y PPID=7282 PS4='+ ' PWD=/ SHELL=/bin/bash SHELLOPTS=braceexpand:errexit:hashall:interactive-comments:posix SHLVL=3 SUDO_COMMAND='/usr/bin/timeout -k 24.1h 24h /usr/bin/ionice -c 3 /usr/bin/nice -n 11 /usr/bin/unshare --uts -- /usr/sbin/pbuilder --build --configfile /srv/reproducible-results/rbuild-debian/r-b-build.U4Y5krjV/pbuilderrc_r72N --distribution unstable --hookdir /etc/pbuilder/rebuild-hooks --debbuildopts -b --basetgz /var/cache/pbuilder/unstable-reproducible-base.tgz --buildresult /srv/reproducible-results/rbuild-debian/r-b-build.U4Y5krjV/b2 --logfile b2/build.log commonmark-bkrs_0.5.4+ds-7.1.dsc' SUDO_GID=113 SUDO_UID=107 SUDO_USER=jenkins TERM=unknown TZ=/usr/share/zoneinfo/Etc/GMT-14 UID=0 USER=root _='I: set' http_proxy=http://10.0.0.15:3142/ I: uname -a Linux i-capture-the-hostname 6.1.0-18-armmp-lpae #1 SMP Debian 6.1.76-1 (2024-02-01) armv7l GNU/Linux I: ls -l /bin lrwxrwxrwx 1 root root 7 Feb 26 07:43 /bin -> usr/bin I: user script /srv/workspace/pbuilder/7282/tmp/hooks/D02_print_environment finished -> Attempting to satisfy build-dependencies -> Creating pbuilder-satisfydepends-dummy package Package: pbuilder-satisfydepends-dummy Version: 0.invalid.0 Architecture: armhf Maintainer: Debian Pbuilder Team Description: Dummy package to satisfy dependencies with aptitude - created by pbuilder This package was created automatically by pbuilder to satisfy the build-dependencies of the package being currently built. Depends: debhelper-compat (= 12), dh-python, help2man, python3-all, python3-docutils, python3-setuptools dpkg-deb: building package 'pbuilder-satisfydepends-dummy' in '/tmp/satisfydepends-aptitude/pbuilder-satisfydepends-dummy.deb'. Selecting previously unselected package pbuilder-satisfydepends-dummy. (Reading database ... 19577 files and directories currently installed.) Preparing to unpack .../pbuilder-satisfydepends-dummy.deb ... Unpacking pbuilder-satisfydepends-dummy (0.invalid.0) ... dpkg: pbuilder-satisfydepends-dummy: dependency problems, but configuring anyway as you requested: pbuilder-satisfydepends-dummy depends on debhelper-compat (= 12); however: Package debhelper-compat is not installed. pbuilder-satisfydepends-dummy depends on dh-python; however: Package dh-python is not installed. pbuilder-satisfydepends-dummy depends on help2man; however: Package help2man is not installed. pbuilder-satisfydepends-dummy depends on python3-all; however: Package python3-all is not installed. pbuilder-satisfydepends-dummy depends on python3-docutils; however: Package python3-docutils is not installed. pbuilder-satisfydepends-dummy depends on python3-setuptools; however: Package python3-setuptools is not installed. Setting up pbuilder-satisfydepends-dummy (0.invalid.0) ... Reading package lists... Building dependency tree... Reading state information... Initializing package states... Writing extended state information... Building tag database... pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) pbuilder-satisfydepends-dummy is already installed at the requested version (0.invalid.0) The following NEW packages will be installed: autoconf{a} automake{a} autopoint{a} autotools-dev{a} bsdextrautils{a} debhelper{a} dh-autoreconf{a} dh-python{a} dh-strip-nondeterminism{a} docutils-common{a} dwz{a} file{a} gettext{a} gettext-base{a} groff-base{a} help2man{a} intltool-debian{a} libarchive-zip-perl{a} libdebhelper-perl{a} libelf1{a} libexpat1{a} libfile-stripnondeterminism-perl{a} libicu72{a} liblocale-gettext-perl{a} libmagic-mgc{a} libmagic1{a} libpipeline1{a} libpython3-stdlib{a} libpython3.11-minimal{a} libpython3.11-stdlib{a} libpython3.12-minimal{a} libpython3.12-stdlib{a} libreadline8{a} libsub-override-perl{a} libtool{a} libuchardet0{a} libxml2{a} m4{a} man-db{a} media-types{a} netbase{a} po-debconf{a} python3{a} python3-all{a} python3-distutils{a} python3-docutils{a} python3-lib2to3{a} python3-minimal{a} python3-pkg-resources{a} python3-roman{a} python3-setuptools{a} python3.11{a} python3.11-minimal{a} python3.12{a} python3.12-minimal{a} readline-common{a} sensible-utils{a} sgml-base{a} tzdata{a} xml-core{a} The following packages are RECOMMENDED but will NOT be installed: ca-certificates curl libarchive-cpio-perl libltdl-dev libmail-sendmail-perl libpaper-utils lynx python3-pil python3-pygments wget 0 packages upgraded, 60 newly installed, 0 to remove and 0 not upgraded. Need to get 30.7 MB of archives. After unpacking 117 MB will be used. Writing extended state information... Get: 1 http://deb.debian.org/debian unstable/main armhf liblocale-gettext-perl armhf 1.07-6+b1 [14.6 kB] Get: 2 http://deb.debian.org/debian unstable/main armhf libpython3.11-minimal armhf 3.11.8-1 [802 kB] Get: 3 http://deb.debian.org/debian unstable/main armhf libexpat1 armhf 2.6.0-1 [82.3 kB] Get: 4 http://deb.debian.org/debian unstable/main armhf python3.11-minimal armhf 3.11.8-1 [1707 kB] Get: 5 http://deb.debian.org/debian unstable/main armhf python3-minimal armhf 3.11.6-1 [26.2 kB] Get: 6 http://deb.debian.org/debian unstable/main armhf media-types all 10.1.0 [26.9 kB] Get: 7 http://deb.debian.org/debian unstable/main armhf netbase all 6.4 [12.8 kB] Get: 8 http://deb.debian.org/debian unstable/main armhf tzdata all 2024a-1 [255 kB] Get: 9 http://deb.debian.org/debian unstable/main armhf readline-common all 8.2-3 [69.1 kB] Get: 10 http://deb.debian.org/debian unstable/main armhf libreadline8 armhf 8.2-3+b1 [144 kB] Get: 11 http://deb.debian.org/debian unstable/main armhf libpython3.11-stdlib armhf 3.11.8-1 [1709 kB] Get: 12 http://deb.debian.org/debian unstable/main armhf python3.11 armhf 3.11.8-1 [597 kB] Get: 13 http://deb.debian.org/debian unstable/main armhf libpython3-stdlib armhf 3.11.6-1 [9224 B] Get: 14 http://deb.debian.org/debian unstable/main armhf python3 armhf 3.11.6-1 [26.2 kB] Get: 15 http://deb.debian.org/debian unstable/main armhf libpython3.12-minimal armhf 3.12.2-1 [793 kB] Get: 16 http://deb.debian.org/debian unstable/main armhf python3.12-minimal armhf 3.12.2-1 [1845 kB] Get: 17 http://deb.debian.org/debian unstable/main armhf sgml-base all 1.31 [15.4 kB] Get: 18 http://deb.debian.org/debian unstable/main armhf sensible-utils all 0.0.22 [22.4 kB] Get: 19 http://deb.debian.org/debian unstable/main armhf libmagic-mgc armhf 1:5.45-2+b1 [314 kB] Get: 20 http://deb.debian.org/debian unstable/main armhf libmagic1 armhf 1:5.45-2+b1 [97.9 kB] Get: 21 http://deb.debian.org/debian unstable/main armhf file armhf 1:5.45-2+b1 [42.2 kB] Get: 22 http://deb.debian.org/debian unstable/main armhf gettext-base armhf 0.21-14+b1 [157 kB] Get: 23 http://deb.debian.org/debian unstable/main armhf libuchardet0 armhf 0.0.8-1+b1 [65.7 kB] Get: 24 http://deb.debian.org/debian unstable/main armhf groff-base armhf 1.23.0-3 [1088 kB] Get: 25 http://deb.debian.org/debian unstable/main armhf bsdextrautils armhf 2.39.3-6 [81.2 kB] Get: 26 http://deb.debian.org/debian unstable/main armhf libpipeline1 armhf 1.5.7-1+b2 [33.4 kB] Get: 27 http://deb.debian.org/debian unstable/main armhf man-db armhf 2.12.0-3 [1367 kB] Get: 28 http://deb.debian.org/debian unstable/main armhf m4 armhf 1.4.19-4 [264 kB] Get: 29 http://deb.debian.org/debian unstable/main armhf autoconf all 2.71-3 [332 kB] Get: 30 http://deb.debian.org/debian unstable/main armhf autotools-dev all 20220109.1 [51.6 kB] Get: 31 http://deb.debian.org/debian unstable/main armhf automake all 1:1.16.5-1.3 [823 kB] Get: 32 http://deb.debian.org/debian unstable/main armhf autopoint all 0.21-14 [496 kB] Get: 33 http://deb.debian.org/debian unstable/main armhf libdebhelper-perl all 13.14.1 [85.6 kB] Get: 34 http://deb.debian.org/debian unstable/main armhf libtool all 2.4.7-7 [517 kB] Get: 35 http://deb.debian.org/debian unstable/main armhf dh-autoreconf all 20 [17.1 kB] Get: 36 http://deb.debian.org/debian unstable/main armhf libarchive-zip-perl all 1.68-1 [104 kB] Get: 37 http://deb.debian.org/debian unstable/main armhf libsub-override-perl all 0.10-1 [10.6 kB] Get: 38 http://deb.debian.org/debian unstable/main armhf libfile-stripnondeterminism-perl all 1.13.1-1 [19.4 kB] Get: 39 http://deb.debian.org/debian unstable/main armhf dh-strip-nondeterminism all 1.13.1-1 [8620 B] Get: 40 http://deb.debian.org/debian unstable/main armhf libelf1 armhf 0.190-1+b1 [171 kB] Get: 41 http://deb.debian.org/debian unstable/main armhf dwz armhf 0.15-1 [101 kB] Get: 42 http://deb.debian.org/debian unstable/main armhf libicu72 armhf 72.1-4+b1 [9070 kB] Get: 43 http://deb.debian.org/debian unstable/main armhf libxml2 armhf 2.9.14+dfsg-1.3+b2 [599 kB] Get: 44 http://deb.debian.org/debian unstable/main armhf gettext armhf 0.21-14+b1 [1230 kB] Get: 45 http://deb.debian.org/debian unstable/main armhf intltool-debian all 0.35.0+20060710.6 [22.9 kB] Get: 46 http://deb.debian.org/debian unstable/main armhf po-debconf all 1.0.21+nmu1 [248 kB] Get: 47 http://deb.debian.org/debian unstable/main armhf debhelper all 13.14.1 [890 kB] Get: 48 http://deb.debian.org/debian unstable/main armhf python3-lib2to3 all 3.11.5-1 [77.5 kB] Get: 49 http://deb.debian.org/debian unstable/main armhf python3-distutils all 3.11.5-1 [131 kB] Get: 50 http://deb.debian.org/debian unstable/main armhf python3-pkg-resources all 68.1.2-2 [241 kB] Get: 51 http://deb.debian.org/debian unstable/main armhf python3-setuptools all 68.1.2-2 [468 kB] Get: 52 http://deb.debian.org/debian unstable/main armhf dh-python all 6.20231223 [108 kB] Get: 53 http://deb.debian.org/debian unstable/main armhf xml-core all 0.19 [20.1 kB] Get: 54 http://deb.debian.org/debian unstable/main armhf docutils-common all 0.20.1+dfsg-3 [128 kB] Get: 55 http://deb.debian.org/debian unstable/main armhf help2man armhf 1.49.3 [198 kB] Get: 56 http://deb.debian.org/debian unstable/main armhf libpython3.12-stdlib armhf 3.12.2-1 [1800 kB] Get: 57 http://deb.debian.org/debian unstable/main armhf python3.12 armhf 3.12.2-1 [653 kB] Get: 58 http://deb.debian.org/debian unstable/main armhf python3-all armhf 3.11.6-1 [1060 B] Get: 59 http://deb.debian.org/debian unstable/main armhf python3-roman all 3.3-3 [9880 B] Get: 60 http://deb.debian.org/debian unstable/main armhf python3-docutils all 0.20.1+dfsg-3 [389 kB] Fetched 30.7 MB in 1s (49.2 MB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package liblocale-gettext-perl. (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 ... 19577 files and directories currently installed.) Preparing to unpack .../liblocale-gettext-perl_1.07-6+b1_armhf.deb ... Unpacking liblocale-gettext-perl (1.07-6+b1) ... Selecting previously unselected package libpython3.11-minimal:armhf. Preparing to unpack .../libpython3.11-minimal_3.11.8-1_armhf.deb ... Unpacking libpython3.11-minimal:armhf (3.11.8-1) ... Selecting previously unselected package libexpat1:armhf. Preparing to unpack .../libexpat1_2.6.0-1_armhf.deb ... Unpacking libexpat1:armhf (2.6.0-1) ... Selecting previously unselected package python3.11-minimal. Preparing to unpack .../python3.11-minimal_3.11.8-1_armhf.deb ... Unpacking python3.11-minimal (3.11.8-1) ... Setting up libpython3.11-minimal:armhf (3.11.8-1) ... Setting up libexpat1:armhf (2.6.0-1) ... Setting up python3.11-minimal (3.11.8-1) ... Selecting previously unselected package python3-minimal. (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 ... 19908 files and directories currently installed.) Preparing to unpack .../0-python3-minimal_3.11.6-1_armhf.deb ... Unpacking python3-minimal (3.11.6-1) ... Selecting previously unselected package media-types. Preparing to unpack .../1-media-types_10.1.0_all.deb ... Unpacking media-types (10.1.0) ... Selecting previously unselected package netbase. Preparing to unpack .../2-netbase_6.4_all.deb ... Unpacking netbase (6.4) ... Selecting previously unselected package tzdata. Preparing to unpack .../3-tzdata_2024a-1_all.deb ... Unpacking tzdata (2024a-1) ... Selecting previously unselected package readline-common. Preparing to unpack .../4-readline-common_8.2-3_all.deb ... Unpacking readline-common (8.2-3) ... Selecting previously unselected package libreadline8:armhf. Preparing to unpack .../5-libreadline8_8.2-3+b1_armhf.deb ... Unpacking libreadline8:armhf (8.2-3+b1) ... Selecting previously unselected package libpython3.11-stdlib:armhf. Preparing to unpack .../6-libpython3.11-stdlib_3.11.8-1_armhf.deb ... Unpacking libpython3.11-stdlib:armhf (3.11.8-1) ... Selecting previously unselected package python3.11. Preparing to unpack .../7-python3.11_3.11.8-1_armhf.deb ... Unpacking python3.11 (3.11.8-1) ... Selecting previously unselected package libpython3-stdlib:armhf. Preparing to unpack .../8-libpython3-stdlib_3.11.6-1_armhf.deb ... Unpacking libpython3-stdlib:armhf (3.11.6-1) ... Setting up python3-minimal (3.11.6-1) ... Selecting previously unselected package python3. (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 ... 20896 files and directories currently installed.) Preparing to unpack .../00-python3_3.11.6-1_armhf.deb ... Unpacking python3 (3.11.6-1) ... Selecting previously unselected package libpython3.12-minimal:armhf. Preparing to unpack .../01-libpython3.12-minimal_3.12.2-1_armhf.deb ... Unpacking libpython3.12-minimal:armhf (3.12.2-1) ... Selecting previously unselected package python3.12-minimal. Preparing to unpack .../02-python3.12-minimal_3.12.2-1_armhf.deb ... Unpacking python3.12-minimal (3.12.2-1) ... Selecting previously unselected package sgml-base. Preparing to unpack .../03-sgml-base_1.31_all.deb ... Unpacking sgml-base (1.31) ... Selecting previously unselected package sensible-utils. Preparing to unpack .../04-sensible-utils_0.0.22_all.deb ... Unpacking sensible-utils (0.0.22) ... Selecting previously unselected package libmagic-mgc. Preparing to unpack .../05-libmagic-mgc_1%3a5.45-2+b1_armhf.deb ... Unpacking libmagic-mgc (1:5.45-2+b1) ... Selecting previously unselected package libmagic1:armhf. Preparing to unpack .../06-libmagic1_1%3a5.45-2+b1_armhf.deb ... Unpacking libmagic1:armhf (1:5.45-2+b1) ... Selecting previously unselected package file. Preparing to unpack .../07-file_1%3a5.45-2+b1_armhf.deb ... Unpacking file (1:5.45-2+b1) ... Selecting previously unselected package gettext-base. Preparing to unpack .../08-gettext-base_0.21-14+b1_armhf.deb ... Unpacking gettext-base (0.21-14+b1) ... Selecting previously unselected package libuchardet0:armhf. Preparing to unpack .../09-libuchardet0_0.0.8-1+b1_armhf.deb ... Unpacking libuchardet0:armhf (0.0.8-1+b1) ... Selecting previously unselected package groff-base. Preparing to unpack .../10-groff-base_1.23.0-3_armhf.deb ... Unpacking groff-base (1.23.0-3) ... Selecting previously unselected package bsdextrautils. Preparing to unpack .../11-bsdextrautils_2.39.3-6_armhf.deb ... Unpacking bsdextrautils (2.39.3-6) ... Selecting previously unselected package libpipeline1:armhf. Preparing to unpack .../12-libpipeline1_1.5.7-1+b2_armhf.deb ... Unpacking libpipeline1:armhf (1.5.7-1+b2) ... Selecting previously unselected package man-db. Preparing to unpack .../13-man-db_2.12.0-3_armhf.deb ... Unpacking man-db (2.12.0-3) ... Selecting previously unselected package m4. Preparing to unpack .../14-m4_1.4.19-4_armhf.deb ... Unpacking m4 (1.4.19-4) ... Selecting previously unselected package autoconf. Preparing to unpack .../15-autoconf_2.71-3_all.deb ... Unpacking autoconf (2.71-3) ... Selecting previously unselected package autotools-dev. Preparing to unpack .../16-autotools-dev_20220109.1_all.deb ... Unpacking autotools-dev (20220109.1) ... Selecting previously unselected package automake. Preparing to unpack .../17-automake_1%3a1.16.5-1.3_all.deb ... Unpacking automake (1:1.16.5-1.3) ... Selecting previously unselected package autopoint. Preparing to unpack .../18-autopoint_0.21-14_all.deb ... Unpacking autopoint (0.21-14) ... Selecting previously unselected package libdebhelper-perl. Preparing to unpack .../19-libdebhelper-perl_13.14.1_all.deb ... Unpacking libdebhelper-perl (13.14.1) ... Selecting previously unselected package libtool. Preparing to unpack .../20-libtool_2.4.7-7_all.deb ... Unpacking libtool (2.4.7-7) ... Selecting previously unselected package dh-autoreconf. Preparing to unpack .../21-dh-autoreconf_20_all.deb ... Unpacking dh-autoreconf (20) ... Selecting previously unselected package libarchive-zip-perl. Preparing to unpack .../22-libarchive-zip-perl_1.68-1_all.deb ... Unpacking libarchive-zip-perl (1.68-1) ... Selecting previously unselected package libsub-override-perl. Preparing to unpack .../23-libsub-override-perl_0.10-1_all.deb ... Unpacking libsub-override-perl (0.10-1) ... Selecting previously unselected package libfile-stripnondeterminism-perl. Preparing to unpack .../24-libfile-stripnondeterminism-perl_1.13.1-1_all.deb ... Unpacking libfile-stripnondeterminism-perl (1.13.1-1) ... Selecting previously unselected package dh-strip-nondeterminism. Preparing to unpack .../25-dh-strip-nondeterminism_1.13.1-1_all.deb ... Unpacking dh-strip-nondeterminism (1.13.1-1) ... Selecting previously unselected package libelf1:armhf. Preparing to unpack .../26-libelf1_0.190-1+b1_armhf.deb ... Unpacking libelf1:armhf (0.190-1+b1) ... Selecting previously unselected package dwz. Preparing to unpack .../27-dwz_0.15-1_armhf.deb ... Unpacking dwz (0.15-1) ... Selecting previously unselected package libicu72:armhf. Preparing to unpack .../28-libicu72_72.1-4+b1_armhf.deb ... Unpacking libicu72:armhf (72.1-4+b1) ... Selecting previously unselected package libxml2:armhf. Preparing to unpack .../29-libxml2_2.9.14+dfsg-1.3+b2_armhf.deb ... Unpacking libxml2:armhf (2.9.14+dfsg-1.3+b2) ... Selecting previously unselected package gettext. Preparing to unpack .../30-gettext_0.21-14+b1_armhf.deb ... Unpacking gettext (0.21-14+b1) ... Selecting previously unselected package intltool-debian. Preparing to unpack .../31-intltool-debian_0.35.0+20060710.6_all.deb ... Unpacking intltool-debian (0.35.0+20060710.6) ... Selecting previously unselected package po-debconf. Preparing to unpack .../32-po-debconf_1.0.21+nmu1_all.deb ... Unpacking po-debconf (1.0.21+nmu1) ... Selecting previously unselected package debhelper. Preparing to unpack .../33-debhelper_13.14.1_all.deb ... Unpacking debhelper (13.14.1) ... Selecting previously unselected package python3-lib2to3. Preparing to unpack .../34-python3-lib2to3_3.11.5-1_all.deb ... Unpacking python3-lib2to3 (3.11.5-1) ... Selecting previously unselected package python3-distutils. Preparing to unpack .../35-python3-distutils_3.11.5-1_all.deb ... Unpacking python3-distutils (3.11.5-1) ... Selecting previously unselected package python3-pkg-resources. Preparing to unpack .../36-python3-pkg-resources_68.1.2-2_all.deb ... Unpacking python3-pkg-resources (68.1.2-2) ... Selecting previously unselected package python3-setuptools. Preparing to unpack .../37-python3-setuptools_68.1.2-2_all.deb ... Unpacking python3-setuptools (68.1.2-2) ... Selecting previously unselected package dh-python. Preparing to unpack .../38-dh-python_6.20231223_all.deb ... Unpacking dh-python (6.20231223) ... Selecting previously unselected package xml-core. Preparing to unpack .../39-xml-core_0.19_all.deb ... Unpacking xml-core (0.19) ... Selecting previously unselected package docutils-common. Preparing to unpack .../40-docutils-common_0.20.1+dfsg-3_all.deb ... Unpacking docutils-common (0.20.1+dfsg-3) ... Selecting previously unselected package help2man. Preparing to unpack .../41-help2man_1.49.3_armhf.deb ... Unpacking help2man (1.49.3) ... Selecting previously unselected package libpython3.12-stdlib:armhf. Preparing to unpack .../42-libpython3.12-stdlib_3.12.2-1_armhf.deb ... Unpacking libpython3.12-stdlib:armhf (3.12.2-1) ... Selecting previously unselected package python3.12. Preparing to unpack .../43-python3.12_3.12.2-1_armhf.deb ... Unpacking python3.12 (3.12.2-1) ... Selecting previously unselected package python3-all. Preparing to unpack .../44-python3-all_3.11.6-1_armhf.deb ... Unpacking python3-all (3.11.6-1) ... Selecting previously unselected package python3-roman. Preparing to unpack .../45-python3-roman_3.3-3_all.deb ... Unpacking python3-roman (3.3-3) ... Selecting previously unselected package python3-docutils. Preparing to unpack .../46-python3-docutils_0.20.1+dfsg-3_all.deb ... Unpacking python3-docutils (0.20.1+dfsg-3) ... Setting up media-types (10.1.0) ... Setting up libpipeline1:armhf (1.5.7-1+b2) ... Setting up libicu72:armhf (72.1-4+b1) ... Setting up bsdextrautils (2.39.3-6) ... Setting up libmagic-mgc (1:5.45-2+b1) ... Setting up libarchive-zip-perl (1.68-1) ... Setting up libdebhelper-perl (13.14.1) ... Setting up libpython3.12-minimal:armhf (3.12.2-1) ... Setting up libmagic1:armhf (1:5.45-2+b1) ... Setting up gettext-base (0.21-14+b1) ... Setting up m4 (1.4.19-4) ... Setting up file (1:5.45-2+b1) ... Setting up tzdata (2024a-1) ... Current default time zone: 'Etc/UTC' Local time is now: Tue Mar 12 18:16:28 UTC 2024. Universal Time is now: Tue Mar 12 18:16:28 UTC 2024. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up autotools-dev (20220109.1) ... Setting up autopoint (0.21-14) ... Setting up autoconf (2.71-3) ... Setting up sensible-utils (0.0.22) ... Setting up libuchardet0:armhf (0.0.8-1+b1) ... Setting up libsub-override-perl (0.10-1) ... Setting up netbase (6.4) ... Setting up sgml-base (1.31) ... Setting up libelf1:armhf (0.190-1+b1) ... Setting up readline-common (8.2-3) ... Setting up libxml2:armhf (2.9.14+dfsg-1.3+b2) ... Setting up liblocale-gettext-perl (1.07-6+b1) ... Setting up automake (1:1.16.5-1.3) ... update-alternatives: using /usr/bin/automake-1.16 to provide /usr/bin/automake (automake) in auto mode Setting up libfile-stripnondeterminism-perl (1.13.1-1) ... Setting up python3.12-minimal (3.12.2-1) ... Setting up gettext (0.21-14+b1) ... Setting up libtool (2.4.7-7) ... Setting up libreadline8:armhf (8.2-3+b1) ... Setting up intltool-debian (0.35.0+20060710.6) ... Setting up help2man (1.49.3) ... Setting up dh-autoreconf (20) ... Setting up dh-strip-nondeterminism (1.13.1-1) ... Setting up dwz (0.15-1) ... Setting up groff-base (1.23.0-3) ... Setting up xml-core (0.19) ... Setting up libpython3.12-stdlib:armhf (3.12.2-1) ... Setting up po-debconf (1.0.21+nmu1) ... Setting up libpython3.11-stdlib:armhf (3.11.8-1) ... Setting up python3.12 (3.12.2-1) ... Setting up man-db (2.12.0-3) ... Not building database; man-db/auto-update is not 'true'. Setting up libpython3-stdlib:armhf (3.11.6-1) ... Setting up python3.11 (3.11.8-1) ... Setting up debhelper (13.14.1) ... Setting up python3 (3.11.6-1) ... Setting up python3-roman (3.3-3) ... Setting up python3-lib2to3 (3.11.5-1) ... Setting up python3-pkg-resources (68.1.2-2) ... Setting up python3-distutils (3.11.5-1) ... python3.12: can't get files for byte-compilation Setting up python3-setuptools (68.1.2-2) ... Setting up python3-all (3.11.6-1) ... Setting up dh-python (6.20231223) ... Processing triggers for libc-bin (2.37-15) ... Processing triggers for sgml-base (1.31) ... Setting up docutils-common (0.20.1+dfsg-3) ... Processing triggers for sgml-base (1.31) ... Setting up python3-docutils (0.20.1+dfsg-3) ... Reading package lists... Building dependency tree... Reading state information... Reading extended state information... Initializing package states... Writing extended state information... Building tag database... -> Finished parsing the build-deps I: Building the package I: user script /srv/workspace/pbuilder/7282/tmp/hooks/A99_set_merged_usr starting Not re-configuring usrmerge for unstable I: user script /srv/workspace/pbuilder/7282/tmp/hooks/A99_set_merged_usr finished hostname: Name or service not known I: Running cd /build/reproducible-path/commonmark-bkrs-0.5.4+ds/ && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-buildpackage -us -uc -b && env PATH="/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/i/capture/the/path" HOME="/nonexistent/second-build" dpkg-genchanges -S > ../commonmark-bkrs_0.5.4+ds-7.1_source.changes dpkg-buildpackage: info: source package commonmark-bkrs dpkg-buildpackage: info: source version 0.5.4+ds-7.1 dpkg-buildpackage: info: source distribution unstable dpkg-buildpackage: info: source changed by Matthias Klose dpkg-source --before-build . dpkg-buildpackage: info: host architecture armhf debian/rules clean dh clean --with python3 --buildsystem=pybuild dh_auto_clean -O--buildsystem=pybuild I: pybuild base:305: python3.12 setup.py clean 'build/bdist.linux-armv7l' does not exist -- can't clean it 'build/scripts-3.12' does not exist -- can't clean it I: pybuild base:305: python3.11 setup.py clean 'build/bdist.linux-armv7l' does not exist -- can't clean it 'build/scripts-3.11' does not exist -- can't clean it dh_autoreconf_clean -O--buildsystem=pybuild dh_clean -O--buildsystem=pybuild debian/rules binary dh binary --with python3 --buildsystem=pybuild dh_update_autotools_config -O--buildsystem=pybuild dh_autoreconf -O--buildsystem=pybuild dh_auto_configure -O--buildsystem=pybuild I: pybuild base:305: python3.12 setup.py config I: pybuild base:305: python3.11 setup.py config dh_auto_build -O--buildsystem=pybuild I: pybuild base:305: /usr/bin/python3.12 setup.py build I: pybuild pybuild:336: rm -f build/scripts-3 ; ln -rsf build/scripts-3.11 build/scripts-3 ; ln -f build/scripts-3.12/cmark.py build/scripts-3.12/cmark-bkrs ; mkdir -p build/scripts-3.12/tests ; ln -f build/scripts-3.12/test-CommonMark.py build/scripts-3.12/tests/test-CommonMark.py I: pybuild base:305: /usr/bin/python3 setup.py build I: pybuild pybuild:336: rm -f build/scripts-3 ; ln -rsf build/scripts-3.11 build/scripts-3 ; ln -f build/scripts-3.11/cmark.py build/scripts-3.11/cmark-bkrs ; mkdir -p build/scripts-3.11/tests ; ln -f build/scripts-3.11/test-CommonMark.py build/scripts-3.11/tests/test-CommonMark.py debian/rules override_dh_auto_test make[1]: Entering directory '/build/reproducible-path/commonmark-bkrs-0.5.4+ds' PYBUILD_SYSTEM=custom PYBUILD_TEST_ARGS="{interpreter} CommonMark/test/test-CommonMark.py" dh_auto_test I: pybuild base:305: python3.12 CommonMark/test/test-CommonMark.py /build/reproducible-path/commonmark-bkrs-0.5.4+ds/CommonMark/test/test-CommonMark.py:67: SyntaxWarning: invalid escape sequence '\.' testMatch = re.findall(re.compile("^\.\n([\s\S]*?)^\.\n([\s\S]*?)^.$|^#{1,6} *(.*)$", re.M), tests) /build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.12/build/CommonMark_bkrs/CommonMark.py:186: SyntaxWarning: invalid escape sequence '\s' return bool(re.compile("^\s*$").match(s)) /build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.12/build/CommonMark_bkrs/CommonMark.py:338: SyntaxWarning: invalid escape sequence '\/' "^<([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])?)*)>") /build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.12/build/CommonMark_bkrs/CommonMark.py:385: SyntaxWarning: invalid escape sequence '\s' numdelims <= 3) and (not re.match("\s", char_after)) /build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.12/build/CommonMark_bkrs/CommonMark.py:387: SyntaxWarning: invalid escape sequence '\s' numdelims <= 3) and (not re.match("\s", char_before)) /build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.12/build/CommonMark_bkrs/CommonMark.py:1008: SyntaxWarning: invalid escape sequence '\g' re.sub(r'(?:(\\#) *#*| *#+) *$', '\g<1>', ln[offset:])] [Preprocessing] Test #1 tick Test #2 tick [Precedence] Test #3 tick [Horizontal rules] Test #4 tick Test #5 tick Test #6 tick Test #7 tick Test #8 tick Test #9 tick Test #10 tick Test #11 tick Test #12 tick Test #13 tick Test #14 tick Test #15 tick Test #16 tick Test #17 tick Test #18 tick Test #19 tick Test #20 tick Test #21 tick Test #22 tick [ATX headers] Test #23 tick Test #24 tick Test #25 tick Test #26 tick Test #27 tick Test #28 tick Test #29 tick Test #30 tick Test #31 tick Test #32 tick Test #33 tick Test #34 tick Test #35 tick Test #36 tick Test #37 tick Test #38 tick Test #39 tick [Setext headers] Test #40 tick Test #41 tick Test #42 tick Test #43 tick Test #44 tick Test #45 tick Test #46 tick Test #47 tick Test #48 tick Test #49 tick Test #50 tick Test #51 tick Test #52 tick Test #53 tick [Indented code blocks] Test #54 tick Test #55 tick Test #56 tick Test #57 tick Test #58 tick Test #59 tick Test #60 tick Test #61 tick Test #62 cross === markdown ===============  ␣␣␣␣ ␣␣␣␣foo ␣␣␣␣  === expected =============== 
foo
 === got ==================== 
foo

Test #63 tick [Fenced code blocks] Test #64 tick Test #65 tick Test #66 tick Test #67 tick Test #68 tick Test #69 tick Test #70 tick Test #71 tick Test #72 tick Test #73 tick Test #74 tick Test #75 tick Test #76 tick Test #77 tick Test #78 tick Test #79 tick Test #80 tick Test #81 tick Test #82 tick Test #83 tick Test #84 tick Test #85 tick Test #86 tick [HTML blocks] Test #87 tick Test #88 tick Test #89 tick Test #90 tick Test #91 tick Test #92 tick Test #93 cross === markdown ===============   === expected ===============  Test #94 cross === markdown ===============  The␣opening␣tag␣can␣be␣indented␣1-3␣spaces,␣but␣not␣4:  === expected =============== ␣␣ ␣␣␣␣  === got ==================== 

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

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

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

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

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

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

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

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

*Emphasized*␣text.
 === got ==================== 

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

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

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

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

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

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

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

Compare:

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

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

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

Test #101 cross === markdown ===============  Moreover,␣blank␣lines␣are␣usually␣not␣necessary␣and␣can␣be deleted.␣␣The␣exception␣is␣inside␣`
`␣tags;␣here,␣one␣can
replace␣the␣blank␣lines␣with␣`
`␣entities.

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

##␣Link␣reference␣definitions

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

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


=== expected ===============
[foo]:␣/url␣"title"

[foo]

=== got ====================


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

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

Link␣reference␣definitions

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

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

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

The␣title␣may␣be␣omitted:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Paragraphs

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

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

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

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

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

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

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

Leading␣spaces␣are␣skipped:

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

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

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

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

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

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

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

Blank␣lines

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

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

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

Container␣blocks

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

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

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

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

Block␣quotes

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

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

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

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

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

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

Here␣is␣a␣simple␣example:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

foo

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

foo

Test #142 cross === markdown =============== 

foo

bar

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

foo

bar

Test #143 cross === markdown =============== 

foo bar

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

foo bar

Test #144 cross === markdown =============== 

foo

bar

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

foo

bar

Test #145 cross === markdown =============== 

foo

bar

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

foo

bar

Test #146 cross === markdown =============== 

aaa

bbb

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

aaa

bbb

Test #147 cross === markdown =============== 

bar baz

 === expected ===============   === got ==================== 

bar baz

Test #148 cross === markdown =============== 

bar

baz

 === expected ===============   === got ==================== 

bar

baz

Test #149 cross === markdown =============== 

bar

baz

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

bar

baz

Test #150 cross === markdown =============== 

foo bar

 === expected ===============   === got ==================== 

foo bar

Test #151 cross === markdown =============== 

foo bar baz

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

foo bar baz

Test #152 cross === markdown =============== 
code

not␣code

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

not␣code

Test #153 cross === markdown =============== 

A␣paragraph with␣two␣lines.

indented␣code

A␣block␣quote.

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

A␣paragraph with␣two␣lines.

indented␣code

A␣block␣quote.

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

    indented␣code
    

    A␣block␣quote.

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

    indented␣code
    

    A␣block␣quote.

Test #155 cross === markdown =============== 
  • one

two

 === expected ===============   === got ==================== 
  • one

two

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

    two

 === expected ===============   === got ==================== 
  • one

    two

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

    two

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

    two

Test #159 cross === markdown =============== 
  1. one

    two

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

    two

Test #160 cross === markdown =============== 
  • one

two

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

two

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

    bar

  • foo

bar

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

    bar

  • foo

bar

  • foo
    

    bar

Test #162 cross === markdown =============== 
  1. foo

    bar
    

    baz

    bam

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

    bar
    

    baz

    bam

Test #163 cross === markdown =============== 
  • foo

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

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

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

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

    paragraph

    more␣code
    
     === expected ===============   === got ==================== 
    indented␣code
    

    paragraph

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

      paragraph

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

      paragraph

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

      paragraph

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

      paragraph

      more␣code
      
    Test #168 cross === markdown =============== 

    foo

    bar

     === expected ===============   === got ==================== 

    foo

    bar

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

    bar

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

    bar

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

      bar

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

      bar

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

     === expected ===============   === got ==================== 
    1. Blockquote continued␣here.

    Test #178 cross === markdown =============== 
    1. Blockquote continued␣here.

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

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

    bar

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

      bar

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

      two

    ``` and␣similarly ```␣markdown >␣␣␣-␣one  === got ==================== 
    [Lists] Test #187 tick Test #188 tick Test #189 tick Test #190 tick Test #191 tick Test #192 tick Test #193 tick Test #194 tick Test #195 tick Test #196 tick Test #197 tick Test #198 tick Test #199 tick Test #200 tick Test #201 tick Test #202 tick Test #203 tick Test #204 tick Test #205 tick Test #206 tick [Inlines] Test #207 tick [Backslash escapes] Test #208 tick Test #209 tick Test #210 tick Test #211 tick Test #212 tick Test #213 tick Test #214 tick Test #215 tick Test #216 tick Test #217 tick Test #218 tick Test #219 tick Test #220 tick [Entities] Test #221 tick Test #222 tick Test #223 tick Test #224 tick Test #225 tick Test #226 tick Test #227 tick Test #228 tick Test #229 tick Test #230 tick Test #231 tick Test #232 tick [Code span] Test #233 tick Test #234 tick Test #235 tick Test #236 tick Test #237 tick Test #238 tick Test #239 tick Test #240 tick Test #241 tick Test #242 tick Test #243 tick Test #244 tick Test #245 tick [Emphasis and strong emphasis] Test #246 tick Test #247 tick Test #248 tick Test #249 tick Test #250 tick Test #251 tick Test #252 tick Test #253 tick Test #254 tick Test #255 tick Test #256 tick Test #257 tick Test #258 tick Test #259 tick Test #260 tick Test #261 tick Test #262 tick Test #263 tick Test #264 tick Test #265 tick Test #266 tick Test #267 tick Test #268 tick Test #269 tick Test #270 tick Test #271 tick Test #272 tick Test #273 tick Test #274 tick Test #275 tick Test #276 tick Test #277 tick Test #278 tick Test #279 tick Test #280 tick Test #281 tick Test #282 tick Test #283 tick Test #284 tick Test #285 tick Test #286 tick Test #287 tick Test #288 tick Test #289 tick Test #290 tick Test #291 tick Test #292 tick Test #293 tick Test #294 tick Test #295 tick Test #296 tick Test #297 tick Test #298 tick Test #299 tick Test #300 tick Test #301 tick Test #302 tick Test #303 tick Test #304 tick Test #305 tick Test #306 tick Test #307 tick Test #308 tick Test #309 tick Test #310 tick Test #311 tick Test #312 tick Test #313 tick Test #314 tick Test #315 tick Test #316 tick Test #317 tick Test #318 tick Test #319 tick Test #320 tick Test #321 tick Test #322 tick Test #323 tick Test #324 tick Test #325 tick Test #326 tick Test #327 tick [Links] Test #328 tick Test #329 tick Test #330 tick Test #331 tick Test #332 tick Test #333 tick Test #334 tick Test #335 tick Test #336 tick Test #337 tick Test #338 tick Test #339 tick Test #340 tick Test #341 tick Test #342 tick Test #343 tick Test #344 tick Test #345 tick Test #346 tick Test #347 tick Test #348 tick Test #349 tick Test #350 tick Test #351 tick Test #352 tick Test #353 tick Test #354 tick Test #355 tick Test #356 tick Test #357 tick Test #358 tick Test #359 tick Test #360 tick Test #361 tick Test #362 tick Test #363 tick Test #364 tick Test #365 tick Test #366 tick Test #367 tick Test #368 tick Test #369 tick Test #370 tick Test #371 tick Test #372 tick Test #373 tick Test #374 tick Test #375 tick [Images] Test #376 tick Test #377 tick Test #378 tick Test #379 tick Test #380 tick Test #381 tick Test #382 tick Test #383 tick Test #384 tick Test #385 tick Test #386 tick Test #387 tick Test #388 tick Test #389 tick Test #390 tick Test #391 tick Test #392 tick Test #393 tick Test #394 tick Test #395 tick [Autolinks] Test #396 tick Test #397 tick Test #398 tick Test #399 tick Test #400 tick Test #401 tick Test #402 tick Test #403 tick Test #404 tick Test #405 tick Test #406 tick Test #407 tick Test #408 tick Test #409 tick [Raw HTML] Test #410 tick Test #411 tick Test #412 tick Test #413 tick Test #414 tick Test #415 tick Test #416 tick Test #417 tick Test #418 tick Test #419 tick Test #420 tick Test #421 tick Test #422 tick Test #423 tick Test #424 tick Test #425 tick Test #426 tick Test #427 tick Test #428 tick [Hard line breaks] Test #429 tick Test #430 tick Test #431 tick Test #432 tick Test #433 tick Test #434 tick Test #435 tick Test #436 tick Test #437 tick Test #438 tick Test #439 tick [Soft line breaks] Test #440 tick Test #441 tick [Strings] Test #442 tick Test #443 tick Test #444 tick 349 tests passed, 95 failed runtime: 0.18547979999999997s I: pybuild base:305: python3.11 CommonMark/test/test-CommonMark.py [Preprocessing] Test #1 tick Test #2 tick [Precedence] Test #3 tick [Horizontal rules] Test #4 tick Test #5 tick Test #6 tick Test #7 tick Test #8 tick Test #9 tick Test #10 tick Test #11 tick Test #12 tick Test #13 tick Test #14 tick Test #15 tick Test #16 tick Test #17 tick Test #18 tick Test #19 tick Test #20 tick Test #21 tick Test #22 tick [ATX headers] Test #23 tick Test #24 tick Test #25 tick Test #26 tick Test #27 tick Test #28 tick Test #29 tick Test #30 tick Test #31 tick Test #32 tick Test #33 tick Test #34 tick Test #35 tick Test #36 tick Test #37 tick Test #38 tick Test #39 tick [Setext headers] Test #40 tick Test #41 tick Test #42 tick Test #43 tick Test #44 tick Test #45 tick Test #46 tick Test #47 tick Test #48 tick Test #49 tick Test #50 tick Test #51 tick Test #52 tick Test #53 tick [Indented code blocks] Test #54 tick Test #55 tick Test #56 tick Test #57 tick Test #58 tick Test #59 tick Test #60 tick Test #61 tick Test #62 cross === markdown ===============  ␣␣␣␣ ␣␣␣␣foo ␣␣␣␣  === expected =============== 
    foo
    
     === got ==================== 
    foo
    
    
    Test #63 tick [Fenced code blocks] Test #64 tick Test #65 tick Test #66 tick Test #67 tick Test #68 tick Test #69 tick Test #70 tick Test #71 tick Test #72 tick Test #73 tick Test #74 tick Test #75 tick Test #76 tick Test #77 tick Test #78 tick Test #79 tick Test #80 tick Test #81 tick Test #82 tick Test #83 tick Test #84 tick Test #85 tick Test #86 tick [HTML blocks] Test #87 tick Test #88 tick Test #89 tick Test #90 tick Test #91 tick Test #92 tick Test #93 cross === markdown ===============   === expected ===============  Test #94 cross === markdown ===============  The␣opening␣tag␣can␣be␣indented␣1-3␣spaces,␣but␣not␣4:  === expected =============== ␣␣ ␣␣␣␣  === got ==================== 

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

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

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

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

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

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

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

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

    *Emphasized*␣text.
     === got ==================== 

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

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

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

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

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

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

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

    Compare:

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

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

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

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

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

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

    Link␣reference␣definitions

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

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

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

    The␣title␣may␣be␣omitted:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Paragraphs

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

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

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

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

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

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

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

    Leading␣spaces␣are␣skipped:

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

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

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

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

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

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

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

    Blank␣lines

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

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

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

    Container␣blocks

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

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

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

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

    Block␣quotes

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

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

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

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

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

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

    Here␣is␣a␣simple␣example:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    foo

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

    foo

    Test #142 cross === markdown =============== 

    foo

    bar

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

    foo

    bar

    Test #143 cross === markdown =============== 

    foo bar

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

    foo bar

    Test #144 cross === markdown =============== 

    foo

    bar

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

    foo

    bar

    Test #145 cross === markdown =============== 

    foo

    bar

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

    foo

    bar

    Test #146 cross === markdown =============== 

    aaa

    bbb

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

    aaa

    bbb

    Test #147 cross === markdown =============== 

    bar baz

     === expected ===============   === got ==================== 

    bar baz

    Test #148 cross === markdown =============== 

    bar

    baz

     === expected ===============   === got ==================== 

    bar

    baz

    Test #149 cross === markdown =============== 

    bar

    baz

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

    bar

    baz

    Test #150 cross === markdown =============== 

    foo bar

     === expected ===============   === got ==================== 

    foo bar

    Test #151 cross === markdown =============== 

    foo bar baz

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

    foo bar baz

    Test #152 cross === markdown =============== 
    code
    

    not␣code

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

    not␣code

    Test #153 cross === markdown =============== 

    A␣paragraph with␣two␣lines.

    indented␣code
    

    A␣block␣quote.

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

    A␣paragraph with␣two␣lines.

    indented␣code
    

    A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

    Test #155 cross === markdown =============== 
    • one

    two

     === expected ===============   === got ==================== 
    • one

    two

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

      two

     === expected ===============   === got ==================== 
    • one

      two

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

      two

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

      two

    Test #159 cross === markdown =============== 
    1. one

      two

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

      two

    Test #160 cross === markdown =============== 
    • one

    two

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

    two

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

      bar

    • foo

    bar

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

      bar

    • foo

    bar

    • foo
      

      bar

    Test #162 cross === markdown =============== 
    1. foo

      bar
      

      baz

      bam

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

      bar
      

      baz

      bam

    Test #163 cross === markdown =============== 
    • foo

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

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

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

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

    paragraph

    more␣code
    
     === expected ===============   === got ==================== 
    indented␣code
    

    paragraph

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

      paragraph

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

      paragraph

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

      paragraph

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

      paragraph

      more␣code
      
    Test #168 cross === markdown =============== 

    foo

    bar

     === expected ===============   === got ==================== 

    foo

    bar

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

    bar

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

    bar

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

      bar

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

      bar

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

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

      indented␣code
      

      A␣block␣quote.

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

      indented␣code
      

      A␣block␣quote.

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

     === expected ===============   === got ==================== 
    1. Blockquote continued␣here.

    Test #178 cross === markdown =============== 
    1. Blockquote continued␣here.

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

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

    bar

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

      bar

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

      two

    ``` and␣similarly ```␣markdown >␣␣␣-␣one  === got ==================== 
    [Lists] Test #187 tick Test #188 tick Test #189 tick Test #190 tick Test #191 tick Test #192 tick Test #193 tick Test #194 tick Test #195 tick Test #196 tick Test #197 tick Test #198 tick Test #199 tick Test #200 tick Test #201 tick Test #202 tick Test #203 tick Test #204 tick Test #205 tick Test #206 tick [Inlines] Test #207 tick [Backslash escapes] Test #208 tick Test #209 tick Test #210 tick Test #211 tick Test #212 tick Test #213 tick Test #214 tick Test #215 tick Test #216 tick Test #217 tick Test #218 tick Test #219 tick Test #220 tick [Entities] Test #221 tick Test #222 tick Test #223 tick Test #224 tick Test #225 tick Test #226 tick Test #227 tick Test #228 tick Test #229 tick Test #230 tick Test #231 tick Test #232 tick [Code span] Test #233 tick Test #234 tick Test #235 tick Test #236 tick Test #237 tick Test #238 tick Test #239 tick Test #240 tick Test #241 tick Test #242 tick Test #243 tick Test #244 tick Test #245 tick [Emphasis and strong emphasis] Test #246 tick Test #247 tick Test #248 tick Test #249 tick Test #250 tick Test #251 tick Test #252 tick Test #253 tick Test #254 tick Test #255 tick Test #256 tick Test #257 tick Test #258 tick Test #259 tick Test #260 tick Test #261 tick Test #262 tick Test #263 tick Test #264 tick Test #265 tick Test #266 tick Test #267 tick Test #268 tick Test #269 tick Test #270 tick Test #271 tick Test #272 tick Test #273 tick Test #274 tick Test #275 tick Test #276 tick Test #277 tick Test #278 tick Test #279 tick Test #280 tick Test #281 tick Test #282 tick Test #283 tick Test #284 tick Test #285 tick Test #286 tick Test #287 tick Test #288 tick Test #289 tick Test #290 tick Test #291 tick Test #292 tick Test #293 tick Test #294 tick Test #295 tick Test #296 tick Test #297 tick Test #298 tick Test #299 tick Test #300 tick Test #301 tick Test #302 tick Test #303 tick Test #304 tick Test #305 tick Test #306 tick Test #307 tick Test #308 tick Test #309 tick Test #310 tick Test #311 tick Test #312 tick Test #313 tick Test #314 tick Test #315 tick Test #316 tick Test #317 tick Test #318 tick Test #319 tick Test #320 tick Test #321 tick Test #322 tick Test #323 tick Test #324 tick Test #325 tick Test #326 tick Test #327 tick [Links] Test #328 tick Test #329 tick Test #330 tick Test #331 tick Test #332 tick Test #333 tick Test #334 tick Test #335 tick Test #336 tick Test #337 tick Test #338 tick Test #339 tick Test #340 tick Test #341 tick Test #342 tick Test #343 tick Test #344 tick Test #345 tick Test #346 tick Test #347 tick Test #348 tick Test #349 tick Test #350 tick Test #351 tick Test #352 tick Test #353 tick Test #354 tick Test #355 tick Test #356 tick Test #357 tick Test #358 tick Test #359 tick Test #360 tick Test #361 tick Test #362 tick Test #363 tick Test #364 tick Test #365 tick Test #366 tick Test #367 tick Test #368 tick Test #369 tick Test #370 tick Test #371 tick Test #372 tick Test #373 tick Test #374 tick Test #375 tick [Images] Test #376 tick Test #377 tick Test #378 tick Test #379 tick Test #380 tick Test #381 tick Test #382 tick Test #383 tick Test #384 tick Test #385 tick Test #386 tick Test #387 tick Test #388 tick Test #389 tick Test #390 tick Test #391 tick Test #392 tick Test #393 tick Test #394 tick Test #395 tick [Autolinks] Test #396 tick Test #397 tick Test #398 tick Test #399 tick Test #400 tick Test #401 tick Test #402 tick Test #403 tick Test #404 tick Test #405 tick Test #406 tick Test #407 tick Test #408 tick Test #409 tick [Raw HTML] Test #410 tick Test #411 tick Test #412 tick Test #413 tick Test #414 tick Test #415 tick Test #416 tick Test #417 tick Test #418 tick Test #419 tick Test #420 tick Test #421 tick Test #422 tick Test #423 tick Test #424 tick Test #425 tick Test #426 tick Test #427 tick Test #428 tick [Hard line breaks] Test #429 tick Test #430 tick Test #431 tick Test #432 tick Test #433 tick Test #434 tick Test #435 tick Test #436 tick Test #437 tick Test #438 tick Test #439 tick [Soft line breaks] Test #440 tick Test #441 tick [Strings] Test #442 tick Test #443 tick Test #444 tick 349 tests passed, 95 failed runtime: 0.19347773999999998s make[1]: Leaving directory '/build/reproducible-path/commonmark-bkrs-0.5.4+ds' create-stamp debian/debhelper-build-stamp dh_testroot -O--buildsystem=pybuild dh_prep -O--buildsystem=pybuild dh_auto_install -O--buildsystem=pybuild I: pybuild base:305: /usr/bin/python3.12 setup.py install --root /build/reproducible-path/commonmark-bkrs-0.5.4+ds/debian/tmp /usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() /usr/lib/python3.12/dist-packages/CommonMark_bkrs/CommonMark.py:186: SyntaxWarning: invalid escape sequence '\s' /usr/lib/python3.12/dist-packages/CommonMark_bkrs/CommonMark.py:338: SyntaxWarning: invalid escape sequence '\/' /usr/lib/python3.12/dist-packages/CommonMark_bkrs/CommonMark.py:385: SyntaxWarning: invalid escape sequence '\s' /usr/lib/python3.12/dist-packages/CommonMark_bkrs/CommonMark.py:387: SyntaxWarning: invalid escape sequence '\s' /usr/lib/python3.12/dist-packages/CommonMark_bkrs/CommonMark.py:1008: SyntaxWarning: invalid escape sequence '\g' warning: no files found matching '.gitignore' I: pybuild pybuild:336: LC_ALL=C PYTHONPATH=/build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.12/build help2man --manual="CommonMark Python package (Bibek Kafle and Roland Shoemaker)" --source="CMark-BKRS (Debian 0.5.4+ds-7.1)" --version-string="CMark-BKRS - 0.5.4+ds-7.1" --no-info -s 1 -I debian/man/cmark-bkrs.h2m -n "pure Python script parser for the CommonMark Markdown spec" -o build/scripts-3.12/cmark-bkrs.1 debian/adhoc/wrappers/python3/cmark-bkrs I: pybuild base:305: /usr/bin/python3 setup.py install --root /build/reproducible-path/commonmark-bkrs-0.5.4+ds/debian/tmp /usr/lib/python3/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() warning: no files found matching '.gitignore' I: pybuild pybuild:336: LC_ALL=C PYTHONPATH=/build/reproducible-path/commonmark-bkrs-0.5.4+ds/.pybuild/cpython3_3.11/build help2man --manual="CommonMark Python package (Bibek Kafle and Roland Shoemaker)" --source="CMark-BKRS (Debian 0.5.4+ds-7.1)" --version-string="CMark-BKRS - 0.5.4+ds-7.1" --no-info -s 1 -I debian/man/cmark-bkrs.h2m -n "pure Python script parser for the CommonMark Markdown spec" -o build/scripts-3.11/cmark-bkrs.1 debian/adhoc/wrappers/python3/cmark-bkrs dh_install -O--buildsystem=pybuild debian/rules override_dh_installdocs make[1]: Entering directory '/build/reproducible-path/commonmark-bkrs-0.5.4+ds' dh_installdocs --all debian/README.Debian dh_installdocs: warning: Cannot auto-detect main package for python-commonmark-bkrs-doc. If the default is wrong, please use --doc-main-package make[1]: Leaving directory '/build/reproducible-path/commonmark-bkrs-0.5.4+ds' dh_installchangelogs -O--buildsystem=pybuild dh_installexamples -O--buildsystem=pybuild dh_installexamples: warning: Cannot auto-detect main package for python-commonmark-bkrs-doc. If the default is wrong, please use --doc-main-package dh_installman -O--buildsystem=pybuild dh_python3 -O--buildsystem=pybuild dh_installinit -O--buildsystem=pybuild dh_installsystemduser -O--buildsystem=pybuild dh_lintian -O--buildsystem=pybuild dh_perl -O--buildsystem=pybuild dh_link -O--buildsystem=pybuild dh_strip_nondeterminism -O--buildsystem=pybuild debian/rules override_dh_compress make[1]: Entering directory '/build/reproducible-path/commonmark-bkrs-0.5.4+ds' dh_compress -XREADME.md -Xspec.txt -Xexamples make[1]: Leaving directory '/build/reproducible-path/commonmark-bkrs-0.5.4+ds' dh_fixperms -O--buildsystem=pybuild dh_missing -O--buildsystem=pybuild dh_missing: warning: usr/bin/cmark-bkrs exists in debian/tmp but is not installed to anywhere (related file: "build/scripts-3/cmark-bkrs") dh_missing: warning: usr/bin/cmark.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/bin/test-CommonMark.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/bin/tests/test-CommonMark.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.11/dist-packages/CommonMark_bkrs/CommonMark.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.11/dist-packages/CommonMark_bkrs/__init__.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.11/dist-packages/CommonMark_bkrs/__pycache__/CommonMark.cpython-311.pyc exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.11/dist-packages/CommonMark_bkrs/__pycache__/__init__.cpython-311.pyc exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.11/dist-packages/CommonMark_bkrs/__pycache__/entitytrans.cpython-311.pyc exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.11/dist-packages/CommonMark_bkrs/entitytrans.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.12/dist-packages/CommonMark_bkrs/CommonMark.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.12/dist-packages/CommonMark_bkrs/__init__.py exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.12/dist-packages/CommonMark_bkrs/__pycache__/CommonMark.cpython-312.pyc exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.12/dist-packages/CommonMark_bkrs/__pycache__/__init__.cpython-312.pyc exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.12/dist-packages/CommonMark_bkrs/__pycache__/entitytrans.cpython-312.pyc exists in debian/tmp but is not installed to anywhere dh_missing: warning: usr/lib/python3.12/dist-packages/CommonMark_bkrs/entitytrans.py exists in debian/tmp but is not installed to anywhere While detecting missing files, dh_missing noted some files with a similar name to those that were missing. This warning /might/ be resolved by replacing references to the missing files with the similarly named ones that dh_missing found - assuming the content is identical. As an example, you might want to replace: * build/scripts-3/cmark-bkrs with: * usr/bin/cmark-bkrs in a file in debian/ or as argument to one of the dh_* tools called from debian/rules. (Note it is possible the paths are not used verbatim but instead directories containing or globs matching them are used instead) Alternatively, add the missing file to debian/not-installed if it cannot and should not be used. The following debhelper tools have reported what they installed (with files per package) * dh_install: python-commonmark-bkrs-doc (0), python3-commonmark-bkrs (3) * dh_installdocs: python-commonmark-bkrs-doc (5), python3-commonmark-bkrs (1) * dh_installexamples: python-commonmark-bkrs-doc (2), python3-commonmark-bkrs (0) * dh_installman: python-commonmark-bkrs-doc (0), python3-commonmark-bkrs (1) If the missing files are installed by another tool, please file a bug against it. When filing the report, if the tool is not part of debhelper itself, please reference the "Logging helpers and dh_missing" section from the "PROGRAMMING" guide for debhelper (10.6.3+). (in the debhelper package: /usr/share/doc/debhelper/PROGRAMMING.md.gz) Be sure to test with dpkg-buildpackage -A/-B as the results may vary when only a subset is built If the omission is intentional or no other helper can take care of this consider adding the paths to debian/not-installed. dh_installdeb -O--buildsystem=pybuild dh_gencontrol -O--buildsystem=pybuild dh_md5sums -O--buildsystem=pybuild dh_builddeb -O--buildsystem=pybuild dpkg-deb: building package 'python3-commonmark-bkrs' in '../python3-commonmark-bkrs_0.5.4+ds-7.1_all.deb'. dpkg-deb: building package 'python-commonmark-bkrs-doc' in '../python-commonmark-bkrs-doc_0.5.4+ds-7.1_all.deb'. dpkg-genbuildinfo --build=binary -O../commonmark-bkrs_0.5.4+ds-7.1_armhf.buildinfo dpkg-genchanges --build=binary -O../commonmark-bkrs_0.5.4+ds-7.1_armhf.changes dpkg-genchanges: info: binary-only upload (no source code included) dpkg-source --after-build . dpkg-buildpackage: info: binary-only upload (no source included) dpkg-genchanges: info: not including original source code in upload I: copying local configuration I: user script /srv/workspace/pbuilder/7282/tmp/hooks/B01_cleanup starting I: user script /srv/workspace/pbuilder/7282/tmp/hooks/B01_cleanup finished I: unmounting dev/ptmx filesystem I: unmounting dev/pts filesystem I: unmounting dev/shm filesystem I: unmounting proc filesystem I: unmounting sys filesystem I: cleaning the build env I: removing directory /srv/workspace/pbuilder/7282 and its subdirectories I: Current time: Wed Mar 13 08:17:12 +14 2024 I: pbuilder-time-stamp: 1710267432