Mercurial > cgi-bin > hgweb.cgi > curlyq
comparison curlers.py @ 4:7a83e82e65a6
Remove some deadwood.
author | David Barts <n5jrn@me.com> |
---|---|
date | Thu, 26 Dec 2019 20:04:04 -0800 |
parents | 091c03f1b2e8 |
children | da3fb2312c88 |
comparison
equal
deleted
inserted
replaced
3:091c03f1b2e8 | 4:7a83e82e65a6 |
---|---|
29 "h2", "h3", "h4", "h5", "h6", "hr", "noscript", "ol", "p", "pre", | 29 "h2", "h3", "h4", "h5", "h6", "hr", "noscript", "ol", "p", "pre", |
30 "table", "ul" | 30 "table", "ul" |
31 ]) | 31 ]) |
32 | 32 |
33 # F u n c t i o n s | 33 # F u n c t i o n s |
34 | |
35 def uncurl(ws): | |
36 """ | |
37 Makes all quotes in the workspace non-curly. | |
38 """ | |
39 for i in range(len(ws)): | |
40 ch = ws[i] | |
41 if ch in set([LDQUO, RDQUO]): | |
42 ws[i] = '"' | |
43 elif ch in set([LSQUO, RSQUO]): | |
44 ws[i] = "'" | |
34 | 45 |
35 def _is_cockney(pos, ws): | 46 def _is_cockney(pos, ws): |
36 pos = self._pos | 47 pos = self._pos |
37 ws = self.workspace | 48 ws = self.workspace |
38 for i in _ASTART: | 49 for i in _ASTART: |