Verbatim-safe typography, ^-punctuation quoting, full-range ^UUUU^, polyglot html
Typographic transforms (---, quote pairs, ~) no longer touch verbatim text: @c/@code/@source_listing content and ^'...'^ spans show exactly the characters written. "^" before any punctuation character quotes it in every target (the apostrophe excepted: ^' opens a literal span), with the new :resolve option on @@@target declaring per-target renderings. The ^UUUU^ code-point form accepts 4-6 hex digits, the full Unicode range. The html output and transform spellings are polyglot (XML-valid), in preparation for an EPUB target. New suites: transform_test, character_test (engine), typography_test (SKS). (from dev 07ce5ea86a0a)
This commit is contained in:
@@ -13,8 +13,8 @@ def html_link(target, link_text, is_section, no_quotation_marks):
|
||||
link_text = target if no_quotation_marks else f"“{target}”"
|
||||
else:
|
||||
# Allow long URLs to break at a slash:
|
||||
link_text = re.sub('/', '/<wbr>', target)
|
||||
link_text = re.sub('/<wbr>/<wbr>', '//', link_text)
|
||||
link_text = re.sub('/', '/<wbr/>', target)
|
||||
link_text = re.sub('/<wbr/>/<wbr/>', '//', link_text)
|
||||
link_text = f'<tt>{link_text}</tt>'
|
||||
target = f"[{target}]" if is_section else target
|
||||
#result = f"[__link__{target}__{link_text}__]"
|
||||
|
||||
Reference in New Issue
Block a user