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