This broke in #3382 since re.fullmatch does a different thing for trailing
newlines:
>>> line
'===========\n'
>>> re.match(r'^=+$', line)
<_sre.SRE_Match object; span=(0, 11), match='==========='>
>>> re.fullmatch(r'=+', line)
>>>
This now strips the line by default, and adds newlines if needed.
This adds a Table of Contents to the installation instructions to
improve the navigation within the document.
I decided to use the command line to configure the TOC because there
were problems with using just using an attribute entry in the document
header.
Specifically the insertion of the `header.asciidoc` into the resulting
HTML file prevented the attribute entry approach from working.
The TOC can now be inserted into any doc file using
toc::[]
Per one of the diff comments on #1597:
> I used to use a tuple for constant things, but nowadays I'd actually
> prefer a list as a tuple is something more heterogeneous (i.e. it
> makes sense to have a `(x, y)` point as a tuple, but a list of points
> would be a list).
> At some point I should probably change it to a list everywhere 😉
Windows needs the SystemRoot environment variable set to initialize the crypto
API, what running Python in a subprocess does.
However, we did override the whole environment instead of extending it, which
means this broke on Windows when calling asciidoc:
Traceback (most recent call last):
File "C:\asciidoc-8.6.9\asciidoc.py", line 9, in <module>
import sys, os, re, time, traceback, tempfile, subprocess, codecs, locale, unicodedata, copy
File "C:\Python27\lib\tempfile.py", line 35, in <module>
from random import Random as _Random
File "C:\Python27\lib\random.py", line 885, in <module>
_inst = Random()
File "C:\Python27\lib\random.py", line 97, in __init__
self.seed(x)
File "C:\Python27\lib\random.py", line 113, in seed
a = long(_hexlify(_urandom(2500)), 16)
WindowsError: [Error -2146893795] Provider DLL failed to initialize correctly