diff options
Diffstat (limited to 'tex/context/base/syst-str.mkiv')
-rw-r--r-- | tex/context/base/syst-str.mkiv | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tex/context/base/syst-str.mkiv b/tex/context/base/syst-str.mkiv index db3389ec0..57d76dc03 100644 --- a/tex/context/base/syst-str.mkiv +++ b/tex/context/base/syst-str.mkiv @@ -13,8 +13,17 @@ \unprotect +% nb: these macros might go away ! +% % todo: escape special chars in expr (\luaescapeexpression) +%D I got tired of making dedicated clean up macros using the +%D same mechanism again and again, so now we have: +%D +%D \starttyping +%D \def\xxxx{abc.d} \replacecharacters\xxxx{a.}{-} \xxxx +%D \stoptyping + \def\replacecharacters#1#2#3% macro characters replacement {\dodoglobal\edef#1{\ctxlua{tex.sprint((string.gsub(\!!bs#1\!!es,\!!bs#2\!!es,"#3")))}}} |