Public bug reported:
The first bgcolor="#001122" afre a link will become bgcolor="", due to this
regex which is too greedy:
# Replace links of the form "somefile.html#894" with
"somefile0206.html"
# The following will match anchors like '<a
href="temp0206.html#894"' and will store the 'temp0206.html' in backreference 1.
# The replace string will then replace it with '<a
href="temp0206.html"', i.e. it will take away the '#894' part.
# This is because the numbers after the '#' are often wrong or
non-existent. It is better to link to an existing
# chapter than to a non-existent part of an existing chapter.
page = re.sub('(?i)<a href="([^#]*)#[^"]*"', '<a href="\\1"', page)
because it matches everything until the next #, even if it is outside
the link!
How about this? Is this the way to go? .. at least it seems to work!
page = re.sub('(?i)<a href="([^(#|")]*)#[^"]*"', '<a href="\\1"',
page)
I modified the same place even more, because in my file I have links like <a
href="#X1">X1</a> and so nothing of the link would be left: in my optinion, in
this case I prefer to leave the link intact, as it points inside the same file!
page = re.sub('(?i)<a href="([^#|"]+)#[^"]*"', '<a href="\\1"',
page)
** Affects: chm2pdf (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/890877
Title:
table background color removed Options
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/chm2pdf/+bug/890877/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs