diff --git a/spec.txt b/spec.txt index 7dcfc48e..fe119e5f 100644 --- a/spec.txt +++ b/spec.txt @@ -306,9 +306,15 @@ A line containing no characters, or a line containing only spaces The following definitions of character classes will be used in this spec: +A [zero-width space](@) character is a non-printing and usually invisible +character (`U+200B`) (encodable in HTML as \​ or \​), which can be +used, for instance, for special spacing effects in text (and which in Markdown +can also be used to change the meaning of an adjacent character). + A [Unicode whitespace character](@) is any code point in the Unicode `Zs` general category, or a tab (`U+0009`), -line feed (`U+000A`), form feed (`U+000C`), or carriage return (`U+000D`). +line feed (`U+000A`), form feed (`U+000C`), carriage return (`U+000D`), +or [zero-width space]. [Unicode whitespace](@) is a sequence of one or more [Unicode whitespace characters]. @@ -611,6 +617,51 @@ foo ```````````````````````````````` +## Zero-width space + +For most use-cases requiring escapes it's worth considering using [backslash +escapes], but [zero-width space] can be useful sometimes as well (to change the +meaning of an adjacent character, etc.). + +Given differences in utilization of whitespace, zero-width space can be used to +ensure emphasis, etc. in East Asian text: + +```````````````````````````````` example +棕色*狐狸。*​跳过 +. +

棕色狐狸。​跳过

+```````````````````````````````` + + +Zero-width space may also need to be used to achieve some emphasis effects +while satisfying Markdown's [emphasis and strong emphasis] rules: + +```````````````````````````````` example +Hello *Super-*​**man** +. +

Hello Super-man

+ +```````````````````````````````` + +```````````````````````````````` example +Hello ***Super***​**-man** +. +

Hello Super-man

+ +```````````````````````````````` + + +Zero-width space can also be used to achieve some combined effects such as mixed +bold/italic mark-up: + +```````````````````````````````` example +**bold*bold-italic***​*italic*​***bold-italic*bold** +. +

boldbold-italicitalicbold-italicbold

+ +```````````````````````````````` + + ## Entity and numeric character references Valid HTML entity references and numeric character references