Skip to content

Commit a7f7dfa

Browse files
author
James Graham
committed
Merge (somewhat botched)
1 parent cd0ac71 commit a7f7dfa

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

html5lib/constants.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,21 @@
411411
(namespaces["svg"], "foreignObject")
412412
))
413413

414+
htmlIntegrationPointElements = frozenset((
415+
(namespaces["mathml"], "annotaion-xml"),
416+
(namespaces["svg"], "foreignObject"),
417+
(namespaces["svg"], "desc"),
418+
(namespaces["svg"], "title")
419+
))
420+
421+
mathmlTextIntegrationPointElements = frozenset((
422+
(namespaces["mathml"], "mi"),
423+
(namespaces["mathml"], "mo"),
424+
(namespaces["mathml"], "mn"),
425+
(namespaces["mathml"], "ms"),
426+
(namespaces["mathml"], "mtext")
427+
))
428+
414429
spaceCharacters = frozenset((
415430
u"\t",
416431
u"\n",

html5lib/html5parser.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def startswithany(str, prefixes):
4444
from constants import headingElements, tableInsertModeElements
4545
from constants import cdataElements, rcdataElements, voidElements
4646
from constants import tokenTypes, ReparseException, namespaces, spaceCharacters
47+
from constants import htmlIntegrationPointElements, mathmlTextIntegrationPointElements
4748

4849
def parse(doc, treebuilder="simpletree", encoding=None,
4950
namespaceHTMLElements=True):

0 commit comments

Comments
 (0)