Skip to content

Commit f6dcc89

Browse files
authored
Merge pull request #1058 from sphinx-contrib/replace-v2-anchor-check-for-named-entries
translator: replace spaces with dashes when resolving title anchors
2 parents 6c2d102 + f903ecf commit f6dcc89

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sphinxcontrib/confluencebuilder/storage/translator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ def visit_title(self, node):
282282
# repsective document name) which helps allow `ac:link` macros
283283
# properly link when coming from v1 or v2 editor pages.
284284
if self.v2 and 'names' in node.parent:
285-
for anchor in node.parent['names']:
285+
for name in node.parent['names']:
286+
anchor = name.replace(' ', '-')
286287
target_name = f'{docname}/#{anchor}'
287288
target = self.state.target(target_name)
288289
if target and target not in new_targets:

0 commit comments

Comments
 (0)