From ab19f3cf3c247a5216ae7e7e78ef8c2eaac7ce0a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 14 Dec 2014 18:00:09 -0800 Subject: Clarify that unicode whitespace counts as whitespace in emph rules. Added a test case with a unicode nonbreaking space. See #108, though "whitespace" should still be defined more systematically. This is a step forward. --- spec.txt | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/spec.txt b/spec.txt index b6d4e51..3217e6c 100644 --- a/spec.txt +++ b/spec.txt @@ -4355,8 +4355,8 @@ The following rules capture all of these patterns, while allowing for efficient parsing strategies that do not backtrack: 1. A single `*` character [can open emphasis](@can-open-emphasis) - iff it is not followed by - whitespace. + iff it is not followed by whitespace. (For these purposes, + any unicode space character counts as whitespace.) 2. A single `_` character [can open emphasis](#can-open-emphasis) iff it is not followed by whitespace and it is not preceded by an @@ -4378,8 +4378,7 @@ for efficient parsing strategies that do not backtrack: ASCII alphanumeric character. 7. A double `**` [can close strong emphasis](@can-close-strong-emphasis) - iff it is not preceded by - whitespace. + iff it is not preceded by whitespace. 8. A double `__` [can close strong emphasis](#can-close-strong-emphasis) iff it is not preceded by whitespace and it is not followed by an @@ -4459,6 +4458,14 @@ a * foo bar*

a * foo bar*

. +Unicode nonbreaking spaces count as whitespace, too: + +. +* a * +. +

* a *

+. + Intraword emphasis with `*` is permitted: . -- cgit v1.2.3