Children of a non-formatted tag are formatted
See original GitHub issueThe 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:
- Created 4 years ago
- Comments:11 (11 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 inj2html.tags.specialized.generated
,HtmlTag
is the only class with some extra logic inj2html.tags.specialized.manual
). It tries to enforce allowing onlyhead
andbody
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 fortable
,tr
or other tags). Just my 2 cents …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.