Merge remote-tracking branch 'origin/main' into feature/references
This commit is contained in:
@@ -18,7 +18,7 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
|
||||
margin_id = 0
|
||||
|
||||
def __init__(self):
|
||||
super().__init__(Dash, BlockComment, SpanComment, Quote, Underline, Tag, HalfwidthSpaces, NonbreakingSpaces, NonbreakingSpacesDots, References)
|
||||
super().__init__(Dash, BlockComment, SpanComment, Quote, Underline, Tag, HalfwidthSpaces, NonbreakingSpaces, NonbreakingSpacesDots, HalfwidthSpaces, NonbreakingSpaces, NonbreakingSpacesDots, References)
|
||||
|
||||
def render_dash(self, token):
|
||||
return " – "
|
||||
@@ -97,7 +97,8 @@ class FiftyOhmHtmlRenderer(HtmlRenderer):
|
||||
return f"{token.first} {token.second}"
|
||||
|
||||
def render_nonbreaking_spaces_dots(self, token):
|
||||
return f" {token.first} "
|
||||
|
||||
def render_references(self, token, dest_id=0, chap_url="DeineMama.html"):
|
||||
return f"<a href="{chap_url}#ref_{token.first}" onclick="highlightRef('{token.first}');">{dest_id}</a>"
|
||||
lookup = {
|
||||
"" : "",
|
||||
" " : " "
|
||||
}
|
||||
return f"{lookup[token.first]}{token.second}{lookup[token.third]}"
|
||||
Reference in New Issue
Block a user