Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Content in a Pre within a details fails to render #4516

Closed
jnurthen opened this issue Aug 15, 2023 · 2 comments
Closed

Content in a Pre within a details fails to render #4516

jnurthen opened this issue Aug 15, 2023 · 2 comments
Labels

Comments

@jnurthen
Copy link
Contributor

Description of problem

Any content within a details element contained in a pre element fails to render

URL to affected spec or repo:

https://w3c.github.io/accname/

What happened (e.g., it crashed)?:

Content in the examples fails to render

Expected behavior (e.g., it shouldn't crash):

It should render

Optional, steps to reproduce:

For a simplified example I modified basic.html in respec/examples as follows. Same issue reproduces here

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8" />
    <title>Replace me with a real title</title>
    <script src="../profiles/w3c.js" type="module" class="remove"></script>
    <script class="remove">
      // All config options at https://respec.org/docs/
      var respecConfig = {
        specStatus: "ED",
        editors: [
          {
            name: "Your Name",
            url: "https://your-site.com",
          },
        ],
        github: "w3c/respec",
        shortName: "respec",
        xref: "web-platform",
        group: "webapps",
        noRecTrack: true,
      };
    </script>
  </head>
  <body>
    <section id="abstract">
      <p>This is required.</p>
    </section>
    <section id="sotd">
      <p>This is required.</p>
    </section>
    <section class="informative">
      <h2>Introduction</h2>
      <p>Some informative introductory text.</p>
      <aside class="note" title="A useful note">
        <p>I'm a note!</p>
      </aside>
    </section>
    <section>
      <h2>A section</h2>
      <aside class="example">
        <p>This is an example.</p>
// Added Details element
        <details> 
          <summary>Example</summary>
          <pre class="js">
          // Automatic syntax highlighting
          function someJavaScript(){}
          </pre>
        </details>

      </aside>
      <section>
        <h3>I'm a sub-section</h3>
        <p class="issue" data-number="3524">
          <!-- Issue can automatically be populated from GitHub -->
        </p>
      </section>
    </section>
    <section data-dfn-for="Foo">
      <h2>Start your spec!</h2>
      <pre class="idl">
        [Exposed=Window]
        interface Foo {
        attribute DOMString bar;
        undefined doTheFoo();
        };
      </pre>
      <p>The <dfn>Foo</dfn> interface represents a {{Foo}}.</p>
      <p>
        The <dfn>doTheFoo()</dfn> method does the foo. Call it by running
        {{Foo/doTheFoo()}}.
      </p>
      <ol class="algorithm">
        <li>A |variable:DOMString| can be declared like this.</li>
      </ol>
    </section>
    <section id="conformance">
      <p>
        This is required for specifications that contain normative material.
      </p>
    </section>
    <section id="index"></section>
  </body>
</html>
@sidvishnoi
Copy link
Member

sidvishnoi commented Sep 13, 2023

@jnurthen Seems to be working fine based on your example? Can you confirm?
image

@sidvishnoi
Copy link
Member

Reproduced in Chrome today.
Tracking in https://github.com/w3c/respec/issues/4695 now, so closing as duplicate.

@sidvishnoi sidvishnoi closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants