summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pygmentex/pygmentex_demo.py
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/pygmentex/pygmentex_demo.py')
-rw-r--r--macros/latex/contrib/pygmentex/pygmentex_demo.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/macros/latex/contrib/pygmentex/pygmentex_demo.py b/macros/latex/contrib/pygmentex/pygmentex_demo.py
new file mode 100644
index 0000000000..a5fa60eed4
--- /dev/null
+++ b/macros/latex/contrib/pygmentex/pygmentex_demo.py
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+
+def parse_opts(dic, opts):
+ for opt in re.split(r'\s*,\s*', opts):
+ x = re.split(r'\s*=\s*', opt)
+ if len(x) == 2 and x[0] and x[1]:
+ dic[x[0]] = x[1]
+ elif len(x) == 1 and x[0]:
+ dic[x[0]] = True
+ return dic