Skip to content

Commit

Permalink
html: Allow callers to customize the classes applied to <pre> blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
cpitclaudel committed Jun 19, 2020
1 parent 514ff97 commit dc29a51
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions alectryon/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def gen_sentence_html(self, fr):
for wsp in fr.wsp:
tags.span(wsp.contents, cls="coq-wsp")

def gen_fragments_html(self, fragments):
def gen_fragments_html(self, fragments, classes=()):
"""Serialize a list of `fragments` to HTML."""
with tags.pre(cls="alectryon-io") as div:
with tags.pre(cls=" ".join(("alectryon-io", *classes))) as div:
tags.comment(" Generator: {} ".format(GENERATOR))
for fr in htmlify_sentences(fragments):
if isinstance(fr, CoqText):
Expand Down

0 comments on commit dc29a51

Please sign in to comment.