use (or) instead of (if) for a default
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
:String blockTemplate
|
:String blockTemplate
|
||||||
&opt :String flags]
|
&opt :String flags]
|
||||||
[
|
[
|
||||||
&mut :String->Bool canConvert ->block ?(R.match regex block /*TODO use or for this */(if flags flags ""))
|
&mut :String->Bool canConvert ->block ?(R.match regex block (or flags ""))
|
||||||
&mut :String->String convert ->_ "\$(let [groups .namedGroups (R.match #\"$(escapeRegex regex)\"# source \"$(if flags flags "")\") group ->g (dictGet groups g)] \"${blockTemplate}\")"
|
&mut :String->String convert ->_ "\$(let [groups .namedGroups (R.match #\"$(escapeRegex regex)\"# source \"$(if flags flags "")\") group ->g (dictGet groups g)] \"${blockTemplate}\")"
|
||||||
])
|
])
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user