Skip to content

Use Implicit wrapper instead of Implicit Child #10

Description

@kildom

This new name may be easier to understand, e.g.:


When you place a node that is not allowed directly in current context, it will be wrapped using implicit wrapper tag.
For example, if you put <font> directly inside <document>, the DocTML will internally wrap <font> element with <p> element before placing it in the <document> element. This happens because <document> element has implicit wrapper <p>. In other words, the following code:

<document>
  <font size="8pt">foo</font>
</document>

will be interpret as:

<document>
  <p>
    <font size="8pt">foo</font>
  </p>
</document>

The implicit wrapper may be applied multiple times until valid hierarchy is reached.
For example, if you put text directly inside <document>, it will be wrapped with <p> first and then <font>. In other words, the following code:

<document>
  foo
</document>

will be interpret as:

<document>
  <p>
    <font>foo</font>
  </p>
</document>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions