mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1389949 [Little typo?](https://bugs.launchpad.net/calibre/+bug/1389949)
This commit is contained in:
parent
36b1a697c2
commit
3bcede0352
@ -308,7 +308,7 @@ Some of the checks performed are:
|
||||
auto-fixing can sometimes have unexpected effects, so use with care. As
|
||||
always, a checkpoint is created before auto-fixing so you can easily
|
||||
revert all changes. Auto-fixing works by parsing the markup using the
|
||||
HTML 5 algorithm, which is highly fault tolerant and then converting to
|
||||
HTML5 algorithm, which is highly fault tolerant and then converting to
|
||||
well formed XML.
|
||||
|
||||
* Malformed or unknown CSS styles. Any CSS that is not valid or that has
|
||||
@ -383,7 +383,7 @@ Fix HTML
|
||||
This tool simply converts HTML that cannot be parsed as XML into well-formed
|
||||
XML. It is very common in ebooks to have non-well-formed XML, so this tool
|
||||
simply automates the process of fixing such HTML. The tool works by parsing the
|
||||
HTML using the HTML 5 algorithm (the algorithm used in all modern browsers) and
|
||||
HTML using the HTML5 algorithm (the algorithm used in all modern browsers) and
|
||||
then converting the result into XML. Be aware that auto-fixing can sometimes
|
||||
have counter-intuitive results. If you prefer, you can use the Check Book tool
|
||||
discussed above to find and manually correct problems in the HTML. Accessed via
|
||||
|
@ -185,7 +185,7 @@ def pretty_html_tree(container, root):
|
||||
pretty_script_or_style(container, child)
|
||||
|
||||
def fix_html(container, raw):
|
||||
' Fix any parsing errors in the HTML represented as a string in raw. Fixing is done using the HTML 5 parsing algorithm. '
|
||||
' Fix any parsing errors in the HTML represented as a string in raw. Fixing is done using the HTML5 parsing algorithm. '
|
||||
root = container.parse_xhtml(raw)
|
||||
return serialize(root, 'text/html')
|
||||
|
||||
@ -209,7 +209,7 @@ def pretty_xml(container, name, raw):
|
||||
return serialize(root, 'text/xml')
|
||||
|
||||
def fix_all_html(container):
|
||||
' Fix any parsing errors in all HTML files in the container. Fixing is done using the HTML 5 parsing algorithm. '
|
||||
' Fix any parsing errors in all HTML files in the container. Fixing is done using the HTML5 parsing algorithm. '
|
||||
for name, mt in container.mime_map.iteritems():
|
||||
if mt in OEB_DOCS:
|
||||
container.parsed(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user