X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=resources%2Ftools%2Fpresentation%2Fgenerator_files.py;h=aa4392e473a7dd4bcbb6884dfcc3b813072aa5ef;hb=ec79cd31fd974372fd6cd02be6a504dff6d50e8e;hp=9ef6c0aef34d9d6b06c79c29c318ba2526b41b5f;hpb=e623a04c190479ebfd0f5af69b9c129d22456e3c;p=csit.git diff --git a/resources/tools/presentation/generator_files.py b/resources/tools/presentation/generator_files.py index 9ef6c0aef3..aa4392e473 100644 --- a/resources/tools/presentation/generator_files.py +++ b/resources/tools/presentation/generator_files.py @@ -1,4 +1,4 @@ -# Copyright (c) 2020 Cisco and/or its affiliates. +# Copyright (c) 2021 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -34,7 +34,7 @@ RST_INCLUDE_TABLE = (u"\n.. only:: html\n\n" u"\n .. raw:: latex\n\n" u" \\csvautolongtable{{{file_latex}}}\n\n") -REGEX_NIC_SHORT = re.compile(r'(\d*ge\dp\d)(\D*\d*[a-z]*)-') +REGEX_NIC_SHORT = re.compile(r'(\d*ge\dp\d)([a-z]*\d*[a-z]*)-') def generate_files(spec, data): @@ -205,7 +205,12 @@ def file_details_split(file_spec, input_data, frmt=u"rst"): chapters[chapter_l1][chapter_l2][nic][u"tables"].append( ( table_lst.pop(idx), - suite[u"doc"].replace(u'|br|', u'\n\n -') + suite[u"doc"].replace(u'"', u"'"). + replace(u'\n', u' '). + replace(u'\r', u''). + replace(u'*[', u'\n\n - *['). + replace(u"*", u"**"). + replace(u'\n\n - *[', u' - *[', 1) ) ) break