diff options
author | Neil <nyamatongwe@gmail.com> | 2022-10-26 08:09:47 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-10-26 08:09:47 +1100 |
commit | 76e57bb0da5733042fb2be0c783161dfb40654da (patch) | |
tree | e96460efabd671e4b20c2cbc49fd2aeb28d7b8e8 /scripts | |
parent | a3e45cd77bfa07fc5681132e48d154c3b68fb34a (diff) | |
download | scintilla-mirror-76e57bb0da5733042fb2be0c783161dfb40654da.tar.gz |
Add check for validity of 'seealso' links in documentation. Fix 'seelaso' links.
Fix some minor formatting issues.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/CheckMentioned.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/CheckMentioned.py b/scripts/CheckMentioned.py index 3e87be79c..72b6b49f4 100644 --- a/scripts/CheckMentioned.py +++ b/scripts/CheckMentioned.py @@ -161,7 +161,7 @@ def checkDocumentation(): #~ if api not in headers: #~ print("No header for ", api) - # Examine definitions + # Examine definitions #<b id="SCI_SETLAYOUTCACHE">SCI_SETLAYOUTCACHE(int cacheMode)</b> defPattern = re.compile(r'<b id="([A-Z_0-9]+)">([A-Z][A-Za-z0-9_() *#\"=<>/&;,\n-]+?)</b>') for api, sig in re.findall(defPattern, docs): @@ -201,7 +201,7 @@ def checkDocumentation(): with open(outName, "wt") as docFile: docFile.write(docs) - # Examine constant definitions + # Examine constant definitions #<code>SC_CARETSTICKY_WHITESPACE</code> (2) constPattern = re.compile(r'<code>(\w+)</code> *\((\w+)\)') for name, val in re.findall(constPattern, docs): @@ -212,6 +212,13 @@ def checkDocumentation(): except KeyError: print("***", val, "<-", name) + # Examine 'seealso' definitions + #<a class="seealso" href="#SCI_CREATEDOCUMENT">SCI_CREATEDOCUMENT</a> + seealsoPattern = re.compile(r'"seealso" href="#(\w+)">(\w+)[<(]') + for ref, text in re.findall(seealsoPattern, docs): + if ref != text: + print(f"seealso {text} -> {ref}") + for name in sccToValue.keys(): if name not in ["SCI_OPTIONAL_START", "SCI_LEXER_START"] and name not in docs: print(f"Unknown {name}") |