The internal link plugin and Epub2 publisher add a class="internal" attribute to all links. This causes an XHTML error if the link already has a class attribute. This patch fixes this issue by checking if a class attribute exists first, and prepends the "internal" class to the existing attribute.
Input:
Example line with a footnote[^1].
[^1]: http://www.example.com
This page contains the following errors:
error on line 416 at column 111: Attribute class redefined
Below is a rendering of the page up to the first error.
The internal link plugin and Epub2 publisher add a
class="internal"
attribute to all links. This causes an XHTML error if the link already has a class attribute. This patch fixes this issue by checking if a class attribute exists first, and prepends the "internal" class to the existing attribute.Input:
Output (Before):
Output (After):
Error Message in iBooks:
Screenshot: