The rule above is met only if expression (A) is either of the following:
Phrasing content, but with no ruby elements and with no ruby element descendants
A single ruby element that itself has no ruby element descendants
The latter is, however, not a valid THPL expression, and thus (A) should be phrasing content without any ruby element. In other words, no sub-expressions of (A) can be a RUBY expression.
(Note: On the other hand, (B) may include RUBY expressions because the contents of rt elements are not restricted.)
THPL allows (A) or sub-expressions of (A) to be a RUBY expression, while the HTML standard does not.
Thank you for reporting this!
Although I intended to bring less restriction due to the HTML standard, there are some flaws... 😥
I am thinking of how to fix this, targeting future 0.2.0 release.
There are a couple of problems related to the content model of HTML elements.
ruby
elementsAccording to the HTML Standard, the content model of
ruby
elements is a specific subset of phrasing content.The syntax of RUBY expressions is like following:
The rule above is met only if expression (A) is either of the following:
ruby
elements and with noruby
element descendantsruby
element that itself has noruby
element descendantsThe latter is, however, not a valid THPL expression, and thus (A) should be phrasing content without any
ruby
element. In other words, no sub-expressions of (A) can be a RUBY expression.(Note: On the other hand, (B) may include RUBY expressions because the contents of
rt
elements are not restricted.)THPL allows (A) or sub-expressions of (A) to be a RUBY expression, while the HTML standard does not.
meter
elementsThe content model of
meter
elements is also restricted.The syntax of METER expressions:
Using another METER expression for (C) forms a valid THPL expression, although the HTML standard prohibits nesting
meter
elements.