Skip to content

Commit

Permalink
Rename "sheetsize_default" to <!-- %template_sheetsize% --> (#380)
Browse files Browse the repository at this point in the history
Fixes #377
  • Loading branch information
kvid committed Jun 11, 2024
1 parent 954c4f5 commit d2dd601
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/wireviz/templates/din-6771.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions src/wireviz/wv_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def generate_html_output(
"<!-- %bom_reversed% -->": bom_html_reversed,
"<!-- %sheet_current% -->": "1", # TODO: handle multi-page documents
"<!-- %sheet_total% -->": "1", # TODO: handle multi-page documents
"<!-- %template_sheetsize% -->": metadata.get("template", {}).get("sheetsize", ""),
}

# prepare metadata replacements
Expand All @@ -101,11 +102,6 @@ def generate_html_output(
html_line_breaks(str(entry_value))
)

replacements['"sheetsize_default"'] = '"{}"'.format(
metadata.get("template", {}).get("sheetsize", "")
)
# include quotes so no replacement happens within <style> definition

# perform replacements
# regex replacement adapted from:
# https://gist.github.com/bgusach/a967e0587d6e01e889fd1d776c5f3729
Expand Down

0 comments on commit d2dd601

Please sign in to comment.