Skip to content

Commit

Permalink
Code fix to allow adding markmin translations
Browse files Browse the repository at this point in the history
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…)
  • Loading branch information
queengooborg committed Nov 11, 2016
1 parent 3fed558 commit d51ea90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gluon/languages.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ def findT(path, language=DEFAULT_LANGUAGE):
+ listdir(vp, '^.+\.html$', 0) + listdir(mop, '^.+\.py$', 0):
data = to_native(read_locked(filename))
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:
try:
message = safe_eval(item)
Expand Down

0 comments on commit d51ea90

Please sign in to comment.