diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:35:12 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 09:35:12 +0000 |
commit | 89057599f4791f03c1ee5de836fbe2b5ea434aa9 (patch) | |
tree | 09ef6df146509f94541c1afe9cbd78b7f75e81e7 /debian/dconv/parser/underline.py | |
parent | Adding upstream version 2.6.12. (diff) | |
download | haproxy-89057599f4791f03c1ee5de836fbe2b5ea434aa9.tar.xz haproxy-89057599f4791f03c1ee5de836fbe2b5ea434aa9.zip |
Adding debian version 2.6.12-1+deb12u1.debian/2.6.12-1+deb12u1debian
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.py | 16 |
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 |