about summary refs log tree commit diff stats
path: root/zet.tlv
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2022-03-18 10:37:29 -0700
committerKartik K. Agaram <vc@akkartik.com>2022-03-18 10:43:48 -0700
commit29d53c21acc746c9e0f20211cb665e731a13bf82 (patch)
tree383e0672015f0c7f60b88a73882f51ac8d9c76e5 /zet.tlv
parent0374e82aa523c3f64a99aacacbc23eccb5c25404 (diff)
downloadteliva-29d53c21acc746c9e0f20211cb665e731a13bf82.tar.gz
graphviz: don't interpret substrings as regexes
Diffstat (limited to 'zet.tlv')
-rw-r--r--zet.tlv4
1 files changed, 4 insertions, 0 deletions
diff --git a/zet.tlv b/zet.tlv
index 184cf92..decce6d 100644
--- a/zet.tlv
+++ b/zet.tlv
@@ -60,6 +60,10 @@
     >  return s:sub(1,pos-1)..s:sub(pos+1)
     >end
     >
+    >function string.pos(s, sub)
+    >  return string.find(s, sub, 1, true)  -- plain=true to disable regular expressions
+    >end
+    >
     >-- TODO: backport utf-8 support from Lua 5.3
 - __teliva_timestamp: original
   debugy: