mirror of
https://github.com/TinyTapeout/tt-support-tools.git
synced 2026-11-03 04:36:09 +01:00
fix(datasheet): backslash characters in project description break the datasheet
e.g. the "description" field of the following info.yaml would break the datasheet generation:
```yaml
documentation:
author: "Sarthak Raheja and Bittu N" # Your name
title: "Simple Piano" # Project title
language: "Verilog" # other examples include Verilog, Amaranth, VHDL, etc
# Short description of what your project does
description: |
The input clock is divided into a series of frequencies to mimic a piano having only 12 keys of one octave. User can choose from a choice of 3-5 octaves. Additionally, few pre-defined tunes have been included using RTTTL logic\n
```
This commit is contained in:
@@ -95,6 +95,11 @@ class Docs():
|
||||
else:
|
||||
logging.warning(f"picture {picture_path} not found, skipping")
|
||||
|
||||
# ensure there are no LaTeX escape sequences in various fields
|
||||
for key in ['author', 'description', 'how_it_works', 'how_to_test']:
|
||||
if key in yaml_data:
|
||||
yaml_data[key] = yaml_data[key].replace("\\", "\\\\")
|
||||
|
||||
# now build the doc & print it
|
||||
try:
|
||||
doc = doc_template.format(**yaml_data)
|
||||
|
||||
Reference in New Issue
Block a user