Geonovum / respec

A tool for creating technical documents and web standards. Geonovum fork to modify respec for own use.
Other
2 stars 1 forks source link

data-include + section input #101

Closed dhvenema closed 7 years ago

dhvenema commented 7 years ago

As a user it would be good if it were possible to add additional HTML-code to a data-include. At the moment when a data-include is used, it is not possible to add further code. For example, this does not work:

<section data-include="test.html">
    <section id="add-section">
        <p> ... </p>
    </section>
</section

It would be better if childelements in the <section> are included after the data-include content is included, thus merging in the <section>.

marcoscaceres commented 7 years ago

Im not sure we want to do that, as we would then need to decide if the included text would come before or after the inner text. The right way to do it is to just nest the sections, which would give you the exact same result:

<section>
<section data-include=x.html>
</section>
<section>
Hi!
</section>
</section>
</section>
marcoscaceres commented 7 years ago

Remember you can also use https://github.com/w3c/respec/wiki/data-include-replace

marcoscaceres commented 7 years ago

The data-include-replace will solve the case above too, that is.

dhvenema commented 7 years ago

data-include-replace=true does the job :)