From ea702c4a03111f20408a349bab76e1e071bf7c01 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Fri, 26 Jul 2019 19:09:33 +0930 Subject: [PATCH 1/2] tools/extract-formats.py: allow '*' as well as '1.'/'2.' The format for TLV types looked pretty, but @ZmnSCPxj points out that successive ordered lists in markdown get merged into one megalist. If we allow ordered or unordered lists, we're a bit more futureproof against formatting changes. Signed-off-by: Rusty Russell --- tools/extract-formats.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/extract-formats.py b/tools/extract-formats.py index 6ca2f2aba..64e1406a2 100755 --- a/tools/extract-formats.py +++ b/tools/extract-formats.py @@ -22,14 +22,19 @@ import re import fileinput +# We allow either ordered or unordered lists. typeline = re.compile( - '1\. type: (?P[-0-9A-Za-z_|]+) \(`(?P[A-Za-z0-9_]+)`\)( \(`?(?P