Code fix to allow adding markmin translations
Playing with this file made me realize that the quotes defining the strings themselves are added to the regex searches, and that my previous addition caused invalid syntax. So, I decided to fix this by placing the first quote before the markmin decorator. (Triple quotes won’t work, however…)
This commit is contained in:
1 parent
3fed558bdd
commit
d51ea90e18
1 file changed
+1
-1
+1
-1
@@ -962,7 +962,7 @@ def findT(path, language=DEFAULT_LANGUAGE):
|
|||||||
+ listdir(vp, '^.+\.html$', 0) + listdir(mop, '^.+\.py$', 0):
|
+ listdir(vp, '^.+\.html$', 0) + listdir(mop, '^.+\.py$', 0):
|
||||||
data = to_native(read_locked(filename))
|
data = to_native(read_locked(filename))
|
||||||
items = regex_translate.findall(data)
|
items = regex_translate.findall(data)
|
||||||
items += ["@markmin\x01%s" %x for x in regex_translate_m.findall(data)]
|
for x in regex_translate_m.findall(data): items.append("%s@markmin\x01%s" %(x[0], x[1:]))
|
||||||
for item in items:
|
for item in items:
|
||||||
try:
|
try:
|
||||||
message = safe_eval(item)
|
message = safe_eval(item)
|
||||||
|
|||||||
Reference in new issue
Block a user