diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-07-04 09:40:46 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2020-07-05 11:04:44 +0200 |
commit | 9d8115c03db587a7c5c1cb89d9ebea502ede67e4 (patch) | |
tree | 8c8ab71434accb0a2a384daf1eaeeae45f88fc90 /doc | |
parent | dec7d73446027d1afeb45afb28cb60ce42ceccd3 (diff) | |
download | ptxdist-9d8115c03db587a7c5c1cb89d9ebea502ede67e4.tar.gz ptxdist-9d8115c03db587a7c5c1cb89d9ebea502ede67e4.tar.xz |
docs: limit the characters allowed for the PDF file name
ptxdistHwVendor and ptxdistHwProduct may contain any character, including
spaces. This breaks building the PDF documentation.
Avoid this by replacing any sequence of special characters with a '-'.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/conf.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/conf.py b/doc/conf.py index 8045e972d..92594f407 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -286,11 +286,14 @@ latex_additional_files = [ latex_engine='xelatex' +def sanitize(s): + return re.sub('[^\w@_+=\.-]+', '-', s) + # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ - ('index', "OSELAS.BSP-" + ptxdistHwVendor + "-" + ptxdistHwProduct + '-Quickstart.tex', u'PTXdist Quickstart Manual', + ('index', "OSELAS.BSP-" + sanitize(ptxdistHwVendor) + "-" + sanitize(ptxdistHwProduct) + '-Quickstart.tex', u'PTXdist Quickstart Manual', u'The PTXdist project', 'manual'), ] |