From 4434d2377532123f9191fcc8f112524b1fd10535 Mon Sep 17 00:00:00 2001 From: "Steven R. Baker" Date: Sat, 22 Jan 2022 11:29:27 +0100 Subject: [PATCH] Allow escaping quotations in quoted macro arguments. (#406) --- lib/gollum-lib/filter/macro.rb | 4 ++-- test/test_macros.rb | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/gollum-lib/filter/macro.rb b/lib/gollum-lib/filter/macro.rb index defd7d4c..2023b3f9 100644 --- a/lib/gollum-lib/filter/macro.rb +++ b/lib/gollum-lib/filter/macro.rb @@ -4,7 +4,7 @@ # Replace specified tokens with dynamically generated content. class Gollum::Filter::Macro < Gollum::Filter def extract(data) - quoted_arg = %r{".*?"} + quoted_arg = %r{".*?(?>', commit_details) + assert_match(/@Goodbye "cruel" world@/, @wiki.pages[0].formatted_data) + end + test "ListArgs with a mix or arg styles" do @wiki.write_page("ListArgsMacroPage", :markdown, '<>', commit_details) assert_match(/@foo, bar, and baz@/, @wiki.pages[0].formatted_data)