Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
handle underscore in datatype descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
joergsteffens committed Sep 1, 2017
1 parent 96c2c88 commit f3b856e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion manuals/scripts/generate-resoure-descriptions.py
Expand Up @@ -169,6 +169,12 @@ def getLatexDefaultValue( self, data ):
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"
Expand Down Expand Up @@ -254,7 +260,7 @@ def getResourceDirectives(self, daemon, resourcename):
'datatype': self.getLatexDatatypeRef( data['datatype'] ),
'default': self.getLatexDefaultValue( data ),
'version': data.get( 'start_version', "" ),
'description': data.get( 'description', "" ),
'description': self.getLatexDescription(data),
'required': '',
}

Expand Down

0 comments on commit f3b856e

Please sign in to comment.