Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/pyquickhelper/helpgen/sphinx_main_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,22 @@ def verification_html_file(item, fLOG=noLOG):
content = content.replace("_#!#_LINES_#_", "\n")
lines = content.split("\n")
reg = re.compile("([.][.] _[-a-z_A-Z0-9][:.])")
exceptions = ['<script>document.write(`<img src="']

errors = []
for i, line in enumerate(lines):
if "<h1>Source code for " in line or "<h1>Code source de " in line:
# no need to go further
# the source takes place after this substring
break
found_one = False
for exc in exceptions:
if exc in line:
found_one = True
break
if found_one:
continue

if ":ref:`" in line and ":ref:`{ref_name}`" not in line:
errors.append((i, "wrong :ref:` in " + line.strip("\n\r ")))
if ":func:`" in line:
Expand Down
3 changes: 2 additions & 1 deletion src/quicksetup/pyquicksetup/pyquick.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ class SetupCommandSphinx(_SetupCommand):

def initialize_options(self):
self.layout = "html,rst"
self.nbformats = "ipynb,slides,html,python,rst,github,pdf"
# self.nbformats = "ipynb,slides,html,python,rst,github,pdf"
self.nbformats = "ipynb,html,python,rst,github"

def finalize_options(self):
pass
Expand Down