return data
+def handle_ebnf_rule(data, **kwargs):
+ ebnf_regexp = re.compile(r"^\s+([\w\-_\+]+)\s{3,}=(.+)$")
+ data = ebnf_regexp.sub(r'<b>\1:</b> \2', data)
+ return data
+
+
def add_line_breaks_legends(data, **kwargs):
# RFC diagrams also have legends, of the form:
# (1) ...comment...\n
opts = dict(filename=filename, html_name=html_name, rfcs=rfc_metadata)
for fn in [replace_rfc_by_link, remove_top_space, cleanup_author_header, remove_page_breaks,
- anchor_titles, create_paragraphs, add_line_breaks_legends,
+ anchor_titles, handle_ebnf_rule, create_paragraphs, add_line_breaks_legends,
cleanup_toc, create_diagram_blocks, render_communication_lines_correctly]:
out = fn(out, **opts)
<hr>
<h5>Who is behind this?</h5>
- <p>Hi, I'm <a href="http://khamidou.com">Karim</a>! I'm a backend engineer and have to spend a lot of time reading RFCs. Unfortunately, most of them are really ugly and hard to understand without proper context.</p>
+ <p>Hi, I'm <a href="http://khamidou.com">Karim</a>! I'm a backend engineer and have to spend a lot of time reading RFCs. Unfortunately, most of them are hard to understand without proper context.</p>
<h5>Special thanks:</h5>