fix upgrading of latex references

This commit is contained in:
Damien Elmes 2013-05-22 09:46:09 +09:00
parent 918694a096
commit 4f073f0b85

View File

@ -582,10 +582,10 @@ order by ordinal""", mid)):
new = fld
# rewrite reference in template
t[key] = t[key].replace(all, "{{{%s}}}" % new)
regexps = col.media.regexps + (
r"(\[latex\](.+?)\[/latex\])",
r"(\[\$\](.+?)\[/\$\])",
r"(\[\$\$\](.+?)\[/\$\$\])")
regexps = col.media.regexps + [
r"(\[latex\](?P<fname>.+?)\[/latex\])",
r"(\[\$\](?P<fname>.+?)\[/\$\])",
r"(\[\$\$\](?P<fname>.+?)\[/\$\$\])"]
# process each model
for m in col.models.all():
state = dict(mflds={}, fields=0)