diff --git a/src/actions.cpp b/src/actions.cpp index bd10a7f..d1d1483 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -380,14 +380,7 @@ namespace quickbook values.finish(); out << markup.pre; - if (std::string const* ptr = find(macro, content.get_quickbook().c_str())) - { - out << *ptr; - } - else - { - out << content.get_boostbook(); - } + out << content.get_boostbook(); out << markup.post; } diff --git a/src/actions.hpp b/src/actions.hpp index 27a39c1..7fc0e8e 100644 --- a/src/actions.hpp +++ b/src/actions.hpp @@ -124,16 +124,13 @@ namespace quickbook simple_phrase_action( collector& out - , string_symbols const& macro , quickbook::actions& actions) : out(out) - , macro(macro) , actions(actions) {} void operator()(char) const; collector& out; - string_symbols const& macro; quickbook::actions& actions; }; diff --git a/src/actions_class.cpp b/src/actions_class.cpp index 7487a66..48f1602 100644 --- a/src/actions_class.cpp +++ b/src/actions_class.cpp @@ -75,7 +75,7 @@ namespace quickbook , raw_char(phrase, *this) , escape_unicode(phrase, *this) - , simple_markup(phrase, macro, *this) + , simple_markup(phrase, *this) , break_(phrase, *this) , do_macro(phrase, *this) diff --git a/src/main_grammar.cpp b/src/main_grammar.cpp index 69d374b..d70a225 100644 --- a/src/main_grammar.cpp +++ b/src/main_grammar.cpp @@ -368,10 +368,10 @@ namespace quickbook ; local.simple_markup = - cl::chset<>("*/_=") [local.simple_markup.mark = ph::arg1] - >> cl::eps_p(cl::graph_p) // graph_p must follow first mark + cl::chset<>("*/_=") [local.simple_markup.mark = ph::arg1] + >> cl::eps_p(cl::graph_p) // graph_p must follow first mark >> lookback - [ cl::anychar_p + [ cl::anychar_p // skip back over the markup >> ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark)) // first mark not be preceeded by // the same character. @@ -384,11 +384,12 @@ namespace quickbook [ actions.scoped_output() [ - (+( ~cl::eps_p(local.simple_markup_end) - >> local.nested_char - )) [actions.docinfo_value(ph::arg1, ph::arg2)] - ] - >> cl::f_ch_p(local.simple_markup.mark) + ( cl::eps_p(actions.macro >> local.simple_markup_end) + >> actions.macro [actions.do_macro] + | +(~cl::eps_p(local.simple_markup_end) >> local.nested_char) + ) [actions.docinfo_value(ph::arg1, ph::arg2)] + ] + >> cl::f_ch_p(local.simple_markup.mark) [actions.simple_markup] ] ;