[GNA] Update doc for GNA 3.5 (#18825)

* [GNA] Update doc for GNA 3.5
This commit is contained in:
Jakub Nowicki
2023-07-28 12:25:03 +02:00
committed by GitHub
parent 223461e462
commit fd085f870f
2 changed files with 53 additions and 15 deletions

View File

@@ -4,6 +4,7 @@
import re
import logging
import argparse
import lxml.html
from lxml import etree
from pathlib import Path
from xml.sax import saxutils
@@ -28,7 +29,7 @@ def prepare_xml(xml_dir: Path):
# escape asterisks
contents = contents.replace('*', '\\*')
contents = str.encode(contents)
root = etree.fromstring(contents)
root = lxml.html.fromstring(contents)
# unescape * in sphinxdirectives
sphinxdirectives = root.xpath('//sphinxdirective')