Skip to content

Commit

Permalink
Add CSS to Railroad output (#480)
Browse files Browse the repository at this point in the history
* Fix railroad so head, body args included in html

* Allows overridding the DEFAULT_STYLE
  • Loading branch information
schnorea committed Apr 19, 2023
1 parent fbb17b9 commit bf5ef48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pyparsing/diagram/__init__.py
Expand Up @@ -145,7 +145,8 @@ def railroad_to_html(diagrams: List[NamedDiagram], embed=False, **kwargs) -> str
continue
io = StringIO()
try:
diagram.diagram.writeStandalone(io.write)
css = kwargs.get('css')
diagram.diagram.writeStandalone(io.write, css=css)
except AttributeError:
diagram.diagram.writeSvg(io.write)
title = diagram.name
Expand Down

0 comments on commit bf5ef48

Please sign in to comment.