diff options
| author | Grégoire Duchêne <gduchene@fastmail.net> | 2011-02-20 14:50:02 +0100 |
|---|---|---|
| committer | Grégoire Duchêne <gduchene@fastmail.net> | 2011-02-20 14:50:02 +0100 |
| commit | 02f387c216ca27abd3cad5f7d9043abd9e7ae168 (patch) | |
| tree | d35c0f1328965482866b1f2c6bb797c24fc52f32 /src/parser/text_p.cpp | |
| parent | 7029cc1be25626d86cb62a991f06816fe757eafd (diff) | |
Unbreakable space support added.
Diffstat (limited to 'src/parser/text_p.cpp')
| -rw-r--r-- | src/parser/text_p.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/parser/text_p.cpp b/src/parser/text_p.cpp index 447a556..f833743 100644 --- a/src/parser/text_p.cpp +++ b/src/parser/text_p.cpp @@ -20,7 +20,7 @@ text_p::text_p() : text_p::base_type(text_) { using namespace ph; using qi::standard_wide::char_; - text_ = stext_(_r1) | pstext_(_r1) | ptext_(_r1); + text_ = stext_(_r1) | pstext_(_r1) | atom_ | ptext_(_r1); stext_ = lit("***") >> attr(VSEMPH) >> +text_(_r1) >> "***" | lit("**") >> attr(SEMPH) >> +text_(_r1) >> "**" @@ -37,7 +37,9 @@ text_p::text_p() : text_p::base_type(text_) { pstext_ = lit('[') >> attr(LINK) >> +text_(val(L"]")) >> ']' >> lit('(') >> ptext_(val(L")")) >> ')'; + atom_ = lit(L"\\ ") >> attr(NBSP); + ptext_ = +(echar_ | rchar_(_r1)); - echar_ = lit('\\') >> char_; - rchar_ = char_ - char_(_r1); + echar_ = lit('\\') >> ~char_(' '); + rchar_ = ~char_('\\') - char_(_r1); } |
