Attempt to fix URL in free text matching bug.

This commit is contained in:
Tobias Markmann 2011-10-22 22:26:22 +02:00
parent 6bcd9210ba
commit d8cc52a1bc
1 changed files with 2 additions and 1 deletions

3
gen.py
View File

@ -249,7 +249,8 @@ def buildPDF( file, nr ):
return False
#detect http urls and escape them to make them breakable
error, desc = executeCommand('''sed -i 's|\([\s"]\)\(http://[^ "]*\)|\1\\path{\2}|g' /tmp/xepbuilder/xep-''' + nr + ".tex")
# this should match all urls in free text; not the urls in xml:ns or so..so no " or ' in front.
error, desc = executeCommand('''sed -i 's|\([\s"]\)\([^"]http://[^ "]*\)|\1\\path{\2}|g' /tmp/xepbuilder/xep-''' + nr + ".tex")
if not checkError(error, desc):
return False