From: Karim Hamidou Date: Sun, 20 Mar 2016 01:55:10 +0000 (-0700) Subject: reverting because it's breaking the TOC. X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=6657d94f9fd24326692feff7e9086db5780284e3;p=rfcspot.git reverting because it's breaking the TOC. --- diff --git a/src/render_rfc.py b/src/render_rfc.py index e637cff7..167ea4f9 100644 --- a/src/render_rfc.py +++ b/src/render_rfc.py @@ -120,17 +120,17 @@ def anchor_titles(data, **kwargs): # Reverse section order because lvl1_title_rx matches the beginning of lvl2_title_rx # and lvl3_title_rx. - lvl4_title_rx = re.compile(r"^\s*(\d+)\.(\d+)\.(\d+)\.(\d+)\.*(.*)$", re.MULTILINE) + lvl4_title_rx = re.compile(r"^(\d+)\.(\d+)\.(\d+)\.(\d+)\.*(.*)$", re.MULTILINE) lvl4_template = r"""

\1.\2.\3.\4 \5

""".format(filename) data = lvl4_title_rx.sub(lvl4_template, data) - lvl3_title_rx = re.compile(r"^\s*(\d+)\.(\d+)\.(\d+)\.*(.*)$", re.MULTILINE) + lvl3_title_rx = re.compile(r"^(\d+)\.(\d+)\.(\d+)\.*(.*)$", re.MULTILINE) lvl3_template = r"""\t

\1.\2.\3 \4

""" data = lvl3_title_rx.sub(lvl3_template, data) - lvl2_title_rx = re.compile(r"^\s*(\d+)\.(\d+)\.*(.*)$", re.MULTILINE) + lvl2_title_rx = re.compile(r"^(\d+)\.(\d+)\.*(.*)$", re.MULTILINE) data = lvl2_title_rx.sub(r'\t

\1.\2 \3

', data) lvl1_title_rx = re.compile(r"^(\d+)\.*(.*)$", re.MULTILINE)