Debian Codegraph @

texmf-dist/doc/latex/pygmentex/manual/pygmentex-manual.py

raw
1 # -*- coding: utf-8 -*-
2
3 def parse_opts(dic, opts):
4 for opt in re.split(r'\s*,\s*', opts):
5 x = re.split(r'\s*=\s*', opt)
6 if len(x) == 2 and x[0] and x[1]:
7 dic[x[0]] = x[1]
8 elif len(x) == 1 and x[0]:
9 dic[x[0]] = True
10 return dic