* 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.
This commit is contained in:
Scott Haynie 2024-10-16 12:45:38 -07:00 коммит произвёл GitHub
Родитель 28c421007b
Коммит a75ece591a
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
4 изменённых файлов: 19 добавлений и 5 удалений

Просмотреть файл

14
Sharing/Src/External/swig/Doc/Manual/README поставляемый
Просмотреть файл

@ -1,3 +1,17 @@
**** NOTE 10/16/24
**** The python scripts mentioned below have been renamed in this repository.
**** maketoc.py calls makechap.py which contains regex that triggers codeql alerts.
**** Since the SWIG documentation is already generated and checked in, there is no reason to include the tools
**** to regenerate the docs.
****
**** renamed:
**** Makefile Makefile.bak
**** maketoc.py makefile.py.bak
**** makechap.py makechap.py.bak
****
This directory contains the HTML for the SWIG users manual.
All of this HTML is hand-written. However, section numbering, indices,

Просмотреть файл

@ -72,11 +72,11 @@ name = ""
# Regexs for <h1>,... <h5> sections
h1 = re.compile(r"^.*?<H1>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H1>$", re.IGNORECASE)
h2 = re.compile(r"^.*?<H2>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H2>$", re.IGNORECASE)
h3 = re.compile(r"^.*?<H3>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H3>$", re.IGNORECASE)
h4 = re.compile(r"^.*?<H4>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H4>$", re.IGNORECASE)
h5 = re.compile(r"^.*?<H5>(<a[^>]*>\s*[\d\s]*[^<]*</a>)*[\d\s]*[^<]*</H5>$", re.IGNORECASE)
h1 = re.compile(r".*?<H1>(<a.*?>\s*[\d\s]*(.*?)</a>)*[\d\s]*(.*?)</H1>", re.IGNORECASE)
h2 = re.compile(r".*?<H2>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H2>", re.IGNORECASE)
h3 = re.compile(r".*?<H3>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H3>", re.IGNORECASE)
h4 = re.compile(r".*?<H4>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H4>", re.IGNORECASE)
h5 = re.compile(r".*?<H5>(<a.*?>\s*[\d\.\s]*(.*?)</a>)*[\d\.\s]*(.*?)</H5>", re.IGNORECASE)
data = open(filename).read() # Read data
open(filename+".bak","w").write(data) # Make backup

Просмотреть файл