Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
schwede
ProMod3
Commits
126af66b
Commit
126af66b
authored
Aug 23, 2022
by
Studer Gabriel
Browse files
update doc/cmake.py - resolves import errors observed in sphinx 4.3.2
parent
e443aba5
Changes
1
Hide whitespace changes
Inline
Side-by-side
doc/cmake.py
View file @
126af66b
...
...
@@ -2,6 +2,8 @@
# file Copyright.txt or https://cmake.org/licensing for details.
# Team SMNG note: This file comes from here: https://github.com/Kitware/CMake/blob/master/Utilities/Sphinx/cmake.py
# Team SMNG note: applied patch from here: https://salsa.debian.org/science-team/ycm-cmake-modules/-/blob/master/debian/patches/fix-sphinx-build.patch
# On Ubuntu 22.04 LTS I needed to additionally install the following package: python3-sphinxcontrib.qthelp
import
os
import
re
...
...
@@ -61,8 +63,12 @@ CMakeLexer.tokens["root"] = [
# Monkey patch for sphinx generating invalid content for qcollectiongenerator
# https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords
from
sphinx.util.pycompat
import
htmlescape
from
sphinx.builders.qthelp
import
QtHelpBuilder
import
html
try
:
from
sphinxcontrib.qthelp
import
QtHelpBuilder
except
ImportError
:
# sphinx < 4.0
from
sphinx.builders.qthelp
import
QtHelpBuilder
old_build_keywords
=
QtHelpBuilder
.
build_keywords
def
new_build_keywords
(
self
,
title
,
refs
,
subitems
):
old_items
=
old_build_keywords
(
self
,
title
,
refs
,
subitems
)
...
...
@@ -71,7 +77,7 @@ def new_build_keywords(self, title, refs, subitems):
before
,
rest
=
item
.
split
(
"ref=
\"
"
,
1
)
ref
,
after
=
rest
.
split
(
"
\"
"
)
if
(
"<"
in
ref
and
">"
in
ref
):
new_items
.
append
(
before
+
"ref=
\"
"
+
htmlescape
(
ref
)
+
"
\"
"
+
after
)
new_items
.
append
(
before
+
"ref=
\"
"
+
html
.
escape
(
ref
)
+
"
\"
"
+
after
)
else
:
new_items
.
append
(
item
)
return
new_items
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment