question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Children of a non-formatted tag are formatted

See original GitHub issue

The pre tag is correctly not formatted, though it’s children shouldn’t be either, as they will affect the look of the page.

This can be seen by:

        <pre class="prettyprint lang-java">            <span>
                /*
 * Decompiled with CFR 0.141.
 */
package 
            </span>
            <span class="package">
                net.minecraftforge.api.distmarker
            </span>
            <span>
                ;

public enum Dist {
    CLIENT,
    DEDICATED_SERVER;
    

    public boolean isDedicatedServer() {
        return !this.isClient();
    }

    public boolean isClient() {
        return this == CLIENT;
    }
}

            </span>
        </pre>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
obeckercommented, Apr 23, 2021

Maybe this closed issue is not the best place for discussing these other issues. Nevertheless… The HtmlTag problem stems from the fact that this is apparently a custom implementation that is not complete (most of the tag classes are in j2html.tags.specialized.generated, HtmlTag is the only class with some extra logic in j2html.tags.specialized.manual). It tries to enforce allowing only head and body as children, but in my eyes it is not worth this effort. To keep things simple I would remove this logic (since there is also no similar logic for table, tr or other tags). Just my 2 cents …

0reactions
tipsycommented, Apr 23, 2021

No worries @pointbazaar, sorry for forgetting about your changes too 😃

@obecker @pointbazaar I’ve made an issue here https://github.com/tipsy/j2html/issues/172 to discuss the future of the project, you can move the discussion there. I’ve found a new maintainer (and another person willing to step up). It would be good if we could all get aligned.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Use column formatting to customize SharePoint | Microsoft Learn
You can use column formatting to customize how fields in SharePoint lists and libraries are displayed. To do this, you construct a JSON ......
Read more >
Print pre formatted Array without <pre> tag - Stack Overflow
1 · echo json_encode($array); will output a non-formatted text, just a line. · If you're working on a JSON string, then you'll need...
Read more >
MARC 21 Format for Bibliographic Data: 520: Summary, Etc ...
Unformatted information that describes the scope and general contents of the materials. This could be a summary, abstract, annotation, ...
Read more >
Children Display does not show all children with h1 formatting
I'm using the Children Display macro and child pages will show up if I keep the output unformatted, but some of the children...
Read more >
Tags aren't formatted inside <pre> · Issue #7393 - GitHub
This works as designed. MDN about <pre> tag: The HTML <pre> element represents preformatted text which is to be presented exactly as written...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found