summaryrefslogtreecommitdiffstats
path: root/debian/dconv/parser/underline.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:18:06 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:18:06 +0000
commit9e9d75224939029e63760bddc02d084846f49fe0 (patch)
treefbaf2cd0d33f54add493e6dfb943a46de15aad42 /debian/dconv/parser/underline.py
parentAdding upstream version 2.9.5. (diff)
downloadhaproxy-9e9d75224939029e63760bddc02d084846f49fe0.tar.xz
haproxy-9e9d75224939029e63760bddc02d084846f49fe0.zip
Adding debian version 2.9.5-1.debian/2.9.5-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/dconv/parser/underline.py')
-rw-r--r--debian/dconv/parser/underline.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/dconv/parser/underline.py b/debian/dconv/parser/underline.py
new file mode 100644
index 0000000..3a2350c
--- /dev/null
+++ b/debian/dconv/parser/underline.py
@@ -0,0 +1,16 @@
+import parser
+
+class Parser(parser.Parser):
+ # Detect underlines
+ def parse(self, line):
+ pctxt = self.pctxt
+ if pctxt.has_more_lines(1):
+ nextline = pctxt.get_line(1)
+ if (len(line) > 0) and (len(nextline) > 0) and (nextline[0] == '-') and ("-" * len(line) == nextline):
+ template = pctxt.templates.get_template("parser/underline.tpl")
+ line = template.render(pctxt=pctxt, data=line).strip()
+ pctxt.next(2)
+ pctxt.eat_empty_lines()
+ pctxt.stop = True
+
+ return line