In Doorstop 3.0b10 all links with anchors has additional .html extension before anchor that leads to incorrect hyperlink http://mytest.com:7867/documents/parent.html#childlink
The same hyperlink in 3.0b4 is correctly opened.
Workaround in b10: remove *html from the hyperlink or remove html extension from def _format_html_item_link function in publisher.py:
def _format_html_item_link(item, linkify=True):
"""Format an item link in HTML."""
if linkify and is_item(item):
if item.header:
#link = '<a href="{p}.html#{u}">{u} {h}</a>'.format(
# replace to:
link = '<a href="{p}#{u}">{u} {h}</a>'.format(
u=item.uid, h=item.header, p=item.document.prefix
)
else:
#link = '<a href="{p}.html#{u}">{u}</a>'.format(
# replace to:
link = '<a href="{p}#{u}">{u}</a>'.format(
u=item.uid, p=item.document.prefix
)
return link
else:
return str(item.uid) # if not `Item`, assume this is an `UnknownItem`
But I don't know what is expected format of hyperlinks. The variant without html extension is better for me.
Removing html extension from item.header breaks tests.
In Doorstop 3.0b10 all links with anchors has additional .html extension before anchor that leads to incorrect hyperlink http://mytest.com:7867/documents/parent.html#childlink The same hyperlink in 3.0b4 is correctly opened.
Workaround in b10: remove *html from the hyperlink or remove
html
extension fromdef _format_html_item_link
function in publisher.py:But I don't know what is expected format of hyperlinks. The variant without html extension is better for me. Removing html extension from item.header breaks tests.