aboutsummaryrefslogtreecommitdiff
path: root/lib/text.nom
diff options
context:
space:
mode:
Diffstat (limited to 'lib/text.nom')
-rw-r--r--lib/text.nom10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/text.nom b/lib/text.nom
index cd424b9..2a111fe 100644
--- a/lib/text.nom
+++ b/lib/text.nom
@@ -5,18 +5,18 @@
use "lib/metaprogramming.nom"
# Text functions
-action [%texts joined with %glue]
+action [%texts joined with %glue]:
lua> ".."
local text_bits = {}
for i,bit in ipairs(\%texts) do text_bits[i] = stringify(bit) end
return table.concat(text_bits, \%glue)
parse [joined %texts, %texts joined] as: %texts joined with ""
-compile [capitalized %text, %text capitalized] to
- {expr:"((\(%text as lua expr)):gsub('%l', string.upper, 1))"}
+compile [capitalized %text, %text capitalized] to {..}
+ expr:"((\(%text as lua expr)):gsub('%l', string.upper, 1))"
-compile [%text with %sub instead of %patt, %text s/%patt/%sub] to
- {expr:"((\(%text as lua expr)):gsub(\(%patt as lua expr), \(%sub as lua expr)))"}
+compile [%text with %sub instead of %patt, %text s/%patt/%sub] to {..}
+ expr:"((\(%text as lua expr)):gsub(\(%patt as lua expr), \(%sub as lua expr)))"
# TODO: figure out whether indent/dedent should affect first line
compile [indented %text, %text indented] to {expr:"((\%text):gsub('\\n','\\n'..(' ')))"}