Skip to content

Commit a75ece5

Browse files
authored
Remove docgen python (#322)
* Revert regex change before renaming file * Rename doc creation python scripts. Docs are already generated and checked in, no need to have python here that triggers codeql alerts.
1 parent 28c4210 commit a75ece5

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

Sharing/Src/External/swig/Doc/Manual/README

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
**** NOTE 10/16/24
2+
**** The python scripts mentioned below have been renamed in this repository.
3+
**** maketoc.py calls makechap.py which contains regex that triggers codeql alerts.
4+
**** Since the SWIG documentation is already generated and checked in, there is no reason to include the tools
5+
**** to regenerate the docs.
6+
****
7+
**** renamed:
8+
**** Makefile Makefile.bak
9+
**** maketoc.py makefile.py.bak
10+
**** makechap.py makechap.py.bak
11+
****
12+
13+
14+
115
This directory contains the HTML for the SWIG users manual.
216

317
All of this HTML is hand-written. However, section numbering, indices,

Sharing/Src/External/swig/Doc/Manual/makechap.py Sharing/Src/External/swig/Doc/Manual/makechap.py.bak

+5-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ def getheadingtext(m, s):
7272

7373
# Regexs for <h1>,... <h5> sections
7474

75-
h1 = re.compile(r"^.*?<H1>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H1>$", re.IGNORECASE)
76-
h2 = re.compile(r"^.*?<H2>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H2>$", re.IGNORECASE)
77-
h3 = re.compile(r"^.*?<H3>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H3>$", re.IGNORECASE)
78-
h4 = re.compile(r"^.*?<H4>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H4>$", re.IGNORECASE)
79-
h5 = re.compile(r"^.*?<H5>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H5>$", re.IGNORECASE)
75+
h1 = re.compile(r".*?<H1>(<a.*?>\s*[\d\s]*(.*?)</a>)*[\d\s]*(.*?)</H1>", re.IGNORECASE)
76+
h2 = re.compile(r".*?<H2>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H2>", re.IGNORECASE)
77+
h3 = re.compile(r".*?<H3>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H3>", re.IGNORECASE)
78+
h4 = re.compile(r".*?<H4>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H4>", re.IGNORECASE)
79+
h5 = re.compile(r".*?<H5>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H5>", re.IGNORECASE)
8080

8181
data = open(filename).read() # Read data
8282
open(filename+".bak","w").write(data) # Make backup

0 commit comments

Comments
 (0)