diff options
| -rw-r--r-- | src/elements.h | 3 | ||||
| -rw-r--r-- | src/generators/latex/text_g.cpp | 3 | ||||
| -rw-r--r-- | src/parser/text_p.cpp | 5 |
3 files changed, 7 insertions, 4 deletions
diff --git a/src/elements.h b/src/elements.h index 5f1bc5c..78560d7 100644 --- a/src/elements.h +++ b/src/elements.h @@ -31,7 +31,8 @@ enum stattribute_t { SEMPH, VSEMPH, ALT, - SALT + SALT, + CODE }; struct stext_t { diff --git a/src/generators/latex/text_g.cpp b/src/generators/latex/text_g.cpp index 0cc64cb..93b1716 100644 --- a/src/generators/latex/text_g.cpp +++ b/src/generators/latex/text_g.cpp @@ -25,7 +25,8 @@ latex::text_g::text_g() : text_g::base_type(text_) { | &uint_(SEMPH) << L"\\textit{\\emph{" << +text_ << L"}}" | &uint_(VSEMPH) << L"\\texttt{\\textit{\\emph{" << +text_ << L"}}}" | &uint_(ALT) << L"\\texttt{" << +text_ << '}' - | &uint_(SALT) << L"\\texttt{\\textbf{" << +text_ << L"}}"; + | &uint_(SALT) << L"\\texttt{\\textbf{" << +text_ << L"}}" + | &uint_(CODE) << L"\\texttt{" << +text_ << '}'; ptext_ = +char_; } diff --git a/src/parser/text_p.cpp b/src/parser/text_p.cpp index 3546f5b..22e2a12 100644 --- a/src/parser/text_p.cpp +++ b/src/parser/text_p.cpp @@ -25,9 +25,10 @@ text_p::text_p() : text_p::base_type(text_) { | lit("**") >> attr(SEMPH) >> +text_ >> "**" | lit('*') >> attr(EMPH) >> +text_ >> '*' | lit("''") >> attr(SALT) >> +text_ >> "''" - | lit('\'') >> attr(ALT) >> +text_ >> '\''; + | lit('\'') >> attr(ALT) >> +text_ >> '\'' + | lit('`') >> attr(CODE) >> +ptext_ >> '`'; ptext_ = +(echar_ | rchar_); echar_ = lit('\\') >> char_; - rchar_ = char_ - char_(L"*'"); + rchar_ = char_ - char_(L"*'`"); } |
