Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Steffens <joerg.steffens@bareos.com>2017-09-01 21:38:17 +0300
committerJoerg Steffens <joerg.steffens@bareos.com>2017-10-12 17:08:30 +0300
commit7d3b63cd2c848c4364a14a66587f0df6480ca09f (patch)
tree0067dfe55eb8be38d368b9b79d4d6660ee60ded2
parent402262fa193853d9df30e6d4190add2a904b230d (diff)
handle underscore in datatype descriptions
-rwxr-xr-xmanuals/scripts/generate-resoure-descriptions.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/manuals/scripts/generate-resoure-descriptions.py b/manuals/scripts/generate-resoure-descriptions.py
index 603a5ff..20890bc 100755
--- a/manuals/scripts/generate-resoure-descriptions.py
+++ b/manuals/scripts/generate-resoure-descriptions.py
@@ -169,6 +169,12 @@ class BareosConfigurationSchema2Latex:
default+=" \\textit{\\small(platform specific)}"
return default
+ def getLatexDescription(self, data):
+ description = ""
+ if data.get('description'):
+ description = data.get('description').replace('_','\_')
+ return description
+
def getLatexTable(self, subtree, latexDefine="define%(key)s", latexLink="\\hyperlink{key%(key)s}{%(key)s}" ):
result="\\begin{center}\n"
result+="\\begin{longtable}{ l | l | l | l }\n"
@@ -254,7 +260,7 @@ class BareosConfigurationSchema2Latex:
'datatype': self.getLatexDatatypeRef( data['datatype'] ),
'default': self.getLatexDefaultValue( data ),
'version': data.get( 'start_version', "" ),
- 'description': data.get( 'description', "" ),
+ 'description': self.getLatexDescription(data),
'required': '',
}