lib/glyph/macro.rb in glyph-0.4.0 vs lib/glyph/macro.rb in glyph-0.4.1

- old
+ new

@@ -216,11 +216,10 @@ subtree = interpreter.parse subtree[:source] = context[:source] @node << subtree result = interpreter.document.output end - result.gsub(/\\*([\[\]])/){"\\#$1"} result end # @see Glyph::Document#placeholder def placeholder(&block) @@ -250,10 +249,10 @@ # Executes a macro definition in the context of self def expand block = Glyph::MACROS[@name] macro_error "Undefined macro '#@name'}" unless block res = instance_exec(@node, &block).to_s - res.gsub!(/\\*([\[\]\|])/){"\\#$1"} + res.gsub!(/\\?([\[\]\|])/){"\\#$1"} res end end end