mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(datasheet): blackslash characters still break the datasheet
applied a bruteforce workaround (replace every backslash with `\mbox{\\textbackslash}`) so we can still get the datasheet generated
This commit is contained in:
+5
-3
@@ -95,10 +95,12 @@ class Docs():
|
|||||||
else:
|
else:
|
||||||
logging.warning(f"picture {picture_path} not found, skipping")
|
logging.warning(f"picture {picture_path} not found, skipping")
|
||||||
|
|
||||||
# ensure there are no LaTeX escape sequences in various fields
|
# ensure there are no LaTeX escape sequences in various fields, and that optional fields are set
|
||||||
for key in ['author', 'description', 'how_it_works', 'how_to_test']:
|
for key in ['author', 'description', 'how_it_works', 'how_to_test', 'external_hw', 'clock_hz', 'git_url', 'doc_link']:
|
||||||
if key in yaml_data:
|
if key in yaml_data:
|
||||||
yaml_data[key] = yaml_data[key].replace("\\", "\\\\")
|
yaml_data[key] = str(yaml_data[key]).replace("\\", "\mbox{\\textbackslash}")
|
||||||
|
else:
|
||||||
|
yaml_data[key] = ""
|
||||||
|
|
||||||
# now build the doc & print it
|
# now build the doc & print it
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user