Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
ProMod3
Manage
Activity
Members
Plan
Jira
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
schwede
ProMod3
Commits
126af66b
Commit
126af66b
authored
2 years ago
by
Studer Gabriel
Browse files
Options
Downloads
Patches
Plain Diff
update doc/cmake.py - resolves import errors observed in sphinx 4.3.2
parent
e443aba5
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/cmake.py
+9
-3
9 additions, 3 deletions
doc/cmake.py
with
9 additions
and
3 deletions
doc/cmake.py
+
9
−
3
View file @
126af66b
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
# file Copyright.txt or https://cmake.org/licensing for details.
# 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: 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
os
import
re
import
re
...
@@ -61,8 +63,12 @@ CMakeLexer.tokens["root"] = [
...
@@ -61,8 +63,12 @@ CMakeLexer.tokens["root"] = [
# Monkey patch for sphinx generating invalid content for qcollectiongenerator
# Monkey patch for sphinx generating invalid content for qcollectiongenerator
# https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords
# https://bitbucket.org/birkenfeld/sphinx/issue/1435/qthelp-builder-should-htmlescape-keywords
from
sphinx.util.pycompat
import
htmlescape
import
html
from
sphinx.builders.qthelp
import
QtHelpBuilder
try
:
from
sphinxcontrib.qthelp
import
QtHelpBuilder
except
ImportError
:
# sphinx < 4.0
from
sphinx.builders.qthelp
import
QtHelpBuilder
old_build_keywords
=
QtHelpBuilder
.
build_keywords
old_build_keywords
=
QtHelpBuilder
.
build_keywords
def
new_build_keywords
(
self
,
title
,
refs
,
subitems
):
def
new_build_keywords
(
self
,
title
,
refs
,
subitems
):
old_items
=
old_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):
...
@@ -71,7 +77,7 @@ def new_build_keywords(self, title, refs, subitems):
before
,
rest
=
item
.
split
(
"
ref=
\"
"
,
1
)
before
,
rest
=
item
.
split
(
"
ref=
\"
"
,
1
)
ref
,
after
=
rest
.
split
(
"
\"
"
)
ref
,
after
=
rest
.
split
(
"
\"
"
)
if
(
"
<
"
in
ref
and
"
>
"
in
ref
):
if
(
"
<
"
in
ref
and
"
>
"
in
ref
):
new_items
.
append
(
before
+
"
ref=
\"
"
+
htmlescape
(
ref
)
+
"
\"
"
+
after
)
new_items
.
append
(
before
+
"
ref=
\"
"
+
html
.
escape
(
ref
)
+
"
\"
"
+
after
)
else
:
else
:
new_items
.
append
(
item
)
new_items
.
append
(
item
)
return
new_items
return
new_items
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment