From 6657d94f9fd24326692feff7e9086db5780284e3 Mon Sep 17 00:00:00 2001 From: Karim Hamidou Date: Sat, 19 Mar 2016 18:55:10 -0700 Subject: [PATCH] reverting because it's breaking the TOC. --- src/render_rfc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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) -- 2.43.0