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:
@@ -27,7 +27,7 @@
|
||||
# caret, a leftover single ^ escapes the following character —
|
||||
# the '\^.' rule reproduces exactly that parity.)
|
||||
#
|
||||
# Literal klammers: @code ... code@ interior is verbatim (no # or @
|
||||
# Literal klammers: @code ... code@ and @c ... c@ interior is verbatim (no # or @
|
||||
# interpreted). To add another literal klammer 'foo', copy the
|
||||
# '@code' rule and the 'literal_code' context below, replacing
|
||||
# code -> foo.
|
||||
@@ -43,7 +43,7 @@
|
||||
# * the @NAME verbatim region in doc/edit/vim/syntax/klammertext.vim
|
||||
# * the @NAME rule in
|
||||
# doc/edit/vscode/syntaxes/klammertext.tmLanguage.json
|
||||
# All are currently seeded with just 'code'.
|
||||
# All are currently seeded with 'code' and 'c'.
|
||||
#
|
||||
# ---------------------------------------------------------------------------
|
||||
# How open vs. close is decided (the same rule the Emacs scanner uses):
|
||||
@@ -131,10 +131,13 @@ contexts:
|
||||
scope: punctuation.definition.comment.klammertext
|
||||
push: removal_line
|
||||
|
||||
# --- literal klammer: interior is verbatim (seeded default: @code) ---
|
||||
# --- literal klammers: interior is verbatim (seeded: @code and @c) ---
|
||||
- match: '@code(?![A-Za-z0-9_])'
|
||||
scope: entity.name.function.begin.klammertext
|
||||
push: literal_code
|
||||
- match: '@c(?![A-Za-z0-9_])'
|
||||
scope: entity.name.function.begin.klammertext
|
||||
push: literal_c
|
||||
|
||||
# --- system / target commands @@@ ---
|
||||
- match: '@@@{{name}}'
|
||||
@@ -185,3 +188,11 @@ contexts:
|
||||
- match: 'code@'
|
||||
scope: entity.name.function.end.klammertext
|
||||
pop: true
|
||||
|
||||
# @c ... c@ — the inline form of @code, same verbatim interior. The
|
||||
# lookbehind keeps a word ending in c ("basic@") from closing the span —
|
||||
# essential for a single-letter name.
|
||||
literal_c:
|
||||
- match: '(?<![A-Za-z0-9_])c@'
|
||||
scope: entity.name.function.end.klammertext
|
||||
pop: true
|
||||
|
||||
Reference in New Issue
Block a user