diff options
| author | Mike Schuchardt <mikes@lunarg.com> | 2018-02-21 09:03:34 -0700 |
|---|---|---|
| committer | Mike Schuchardt <mikes@lunarg.com> | 2018-02-21 13:16:03 -0700 |
| commit | e5173eadbb1b1480e136c95501c57cc2c02e639a (patch) | |
| tree | 210c276c76d3b78cc7aed68d61ad8d0e916343a1 /scripts/spec.py | |
| parent | 9ad7f8dcc23b4fcd7719219351961ea1a209858e (diff) | |
| download | usermoji-e5173eadbb1b1480e136c95501c57cc2c02e639a.tar.xz | |
scripts: Strip xref markup from vu error messages
Convert asciidoctor xref markup from "<<anchor, text>>" to "text" for VU
error messages. Longer term plan is to modify the upstream validusage
build target in Vulkan-Docs to emit plain text to begin with.
Change-Id: I6ca6ffb4701df27c9c1666598fbeceb0f3a03216
Diffstat (limited to 'scripts/spec.py')
| -rw-r--r-- | scripts/spec.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scripts/spec.py b/scripts/spec.py index 7823a761..51624483 100644 --- a/scripts/spec.py +++ b/scripts/spec.py @@ -8,6 +8,7 @@ except ImportError: from bs4 import BeautifulSoup import json import vuid_mapping +import re ############################# # spec.py script @@ -127,6 +128,8 @@ class Specification: print ("Looking at dict for api:ext entry %s:%s" % (api, ext)) vuid = vu_txt_dict['vuid'] vutxt = vu_txt_dict['text'] + # strip asciidoc xref from vu text + vutxt = re.sub('&amp;lt;&amp;lt;([^&]*,\\s*|)(.*?)&amp;gt;&amp;gt;', '\\2', vutxt) #print ("%s:%s:%s:%s" % (api, ext, vuid, vutxt)) #print ("VUTXT orig:%s" % (vutxt)) just_txt = BeautifulSoup(vutxt, 'html.parser') |
