eeditiones / tei-publisher-components

Web components used by TEI Publisher and apps generated by it
https://cdn.tei-publisher.com/
GNU General Public License v3.0
18 stars 14 forks source link

pb-code-highlight strips parts of the markup #60

Open tuurma opened 3 years ago

tuurma commented 3 years ago

for source like below, the head element is stripped by pb-code-highlight, only it's text content remains. Sibling p elements are not affected

<pb-code-highlight language="xml" theme="solarizedlight" class="tei-ex_egXML1 example">

  <template>
  <head>SARAJEVO, Bosnia and Herzegovina, April 19</head>
  <p>Serbs seized more territory in this struggling new country today as
  the United States Air Force ended a two-day airlift of humanitarian
  aid into the capital, Sarajevo.</p>
  <p>International relief workers called on European Community nations
  to step up their humanitarian aid to the former Yugoslav republic,
  in conjunction with new American aid flights if necessary.</p>
  <p>A special envoy from the European Community, Colin Doyle, harshly
  condemned the decision by Serbs to shell Sarajevo on Saturday night
  during a visit to the Bosnian capital by a senior American official,
  Deputy Assistant Secretary of State Ralph R. Johnson.</p>
  <p>...</p>
  </template>
  </pb-code-highlight>

image

Bpolitycki commented 2 years ago

This is not a problem of the tei-publisher-components lib. According to MDN just specific content categories are allowed inside a template-tag. See: https://developer.mozilla.org/de/docs/Web/HTML/Element/template

Maybe you could use a header instead?