File tree Expand file tree Collapse file tree 5 files changed +25
-3
lines changed
src/sphinx_codeautolink/extension Expand file tree Collapse file tree 5 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ __pycache__/
66__pypackages__ /
77
88# Distribution / packaging
9+ .pypirc
910.Python
1011/build /
1112/develop-eggs /
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ These release notes are based on
88sphinx-codeautolink adheres to
99`Semantic Versioning <https://semver.org >`_.
1010
11+ Unreleased
12+ ----------
13+ - Fix matching of ``import a, b `` (:issue: `142 `)
14+
11150.15.1 (2024-04-17)
1216-------------------
1317- Fix linking blocks with line numbers (:issue: `137 `)
Original file line number Diff line number Diff line change @@ -376,12 +376,12 @@ def link_html(
376376call_dot_prere = r'(\)</span>\s*<span class="o">\.</span>\s*)'
377377import_prere = (
378378 r'((<span class="kn">import</span>\s+(<span class="p">\(</span>\s*)?)'
379- r'|(<span class="p ">,</span>\s*))'
379+ r'|(<span class="[op] ">,</span>\s*))'
380380)
381381from_prere = r'(<span class="kn">from</span>\s+)'
382382
383383no_dot_postre = r'(?!(<span class="o">\.)|(</a>))'
384- import_postre = r'(?=($)|(\s+)|(<span class="p ">,</span>)|(<span class="p">\)))(?!</a>)'
384+ import_postre = r'(?=($)|(\s+)|(<span class="[op] ">,</span>)|(<span class="p">\)))(?!</a>)'
385385from_postre = r'(?=\s*<span class="kn">import</span>)'
386386
387387
Original file line number Diff line number Diff line change 1+ json
2+ math
3+ # split
4+ extensions = [
5+ "sphinx.ext.intersphinx",
6+ "sphinx_codeautolink",
7+ ]
8+ intersphinx_mapping = {"python": ('https://docs.python.org/3/', None)}
9+ # split
10+ Test project
11+ ============
12+
13+ .. code:: python
14+
15+ import json, math
16+
17+ .. automodule:: test_project
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ commands_pre =
103103commands =
104104 python -m build
105105 twine check --strict dist/*
106- twine upload dist/*
106+ twine upload dist/* --config-file .pypirc
107107commands_post =
108108 lin,mac: rm -r dist
109109 win: cmd /c rmdir /s /q dist
You can’t perform that action at this time.
0 commit comments