From 1c52895b126efe2e0b715608978a76a779d4ecf9 Mon Sep 17 00:00:00 2001 From: GrĂ©goire DuchĂȘne Date: Sun, 5 Dec 2010 23:13:29 +0100 Subject: Inline math text support added. --- src/parser/document_p.cpp | 2 +- src/parser/text_p.cpp | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'src/parser') diff --git a/src/parser/document_p.cpp b/src/parser/document_p.cpp index f4a95e2..7852649 100644 --- a/src/parser/document_p.cpp +++ b/src/parser/document_p.cpp @@ -16,5 +16,5 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "document_p.h" document_p::document_p() : document_p::base_type(document_) { - document_ = +text_(ph::val(L"*'`")); + document_ = +text_(ph::val(L"*'`$")); } diff --git a/src/parser/text_p.cpp b/src/parser/text_p.cpp index 46dd37b..2fcdc7c 100644 --- a/src/parser/text_p.cpp +++ b/src/parser/text_p.cpp @@ -22,12 +22,13 @@ text_p::text_p() : text_p::base_type(text_) { text_ = stext_(_r1) | ptext_(_r1); - stext_ = lit("***") >> attr(VSEMPH) >> +text_(val(L"*'`")) >> "***" - | lit("**") >> attr(SEMPH) >> +text_(val(L"*'`")) >> "**" - | lit('*') >> attr(EMPH) >> +text_(val(L"*'`")) >> '*' - | lit("''") >> attr(SALT) >> +text_(val(L"*'`"))>> "''" - | lit('\'') >> attr(ALT) >> +text_(val(L"*'`")) >> '\'' - | lit('`') >> attr(CODE) >> +ptext_(val(L"`")) >> '`'; + stext_ = lit("***") >> attr(VSEMPH) >> +text_(_r1) >> "***" + | lit("**") >> attr(SEMPH) >> +text_(_r1) >> "**" + | lit('*') >> attr(EMPH) >> +text_(_r1) >> '*' + | lit("''") >> attr(SALT) >> +text_(_r1)>> "''" + | lit('\'') >> attr(ALT) >> +text_(_r1) >> '\'' + | lit('`') >> attr(CODE) >> +ptext_(val(L"`")) >> '`' + | lit('$') >> attr(MATH) >> +ptext_(val(L"$")) >> '$'; ptext_ = +(echar_ | rchar_(_r1)); echar_ = lit('\\') >> char_; -- cgit v1.2.3-70-g09d2