[html] Remove @Image attributes of text nodes

This commit is contained in:
Andreas Dangel 2023-12-18 18:18:01 +01:00
parent a234e5e353
commit bf66f816f0
No known key found for this signature in database
GPG Key ID: 93450DF2DF9A3FA3
4 changed files with 60 additions and 65 deletions

View File

@ -25,9 +25,4 @@ public class ASTHtmlTextNode extends AbstractHtmlNode<TextNode> {
public String getText() {
return node.getWholeText();
}
@Override
public String getImage() {
return getNormalizedText();
}
}

View File

@ -1,15 +1,15 @@
+- #document[@NodeName = "#document"]
+- #doctype[@Name = "html", @NodeName = "#doctype", @PublicId = "", @SystemId = ""]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- html[@NodeName = "html"]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- head[@NodeName = "head"]
| | +- #text[@Image = "hello", @NodeName = "#text", @NormalizedText = "hello", @Text = "hello"]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@NodeName = "#text", @NormalizedText = "hello", @Text = "hello"]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- body[@NodeName = "body"]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- h1[@NodeName = "h1"]
| | | +- #text[@Image = "world", @NodeName = "#text", @NormalizedText = "world", @Text = "world"]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
| | | +- #text[@NodeName = "#text", @NormalizedText = "world", @Text = "world"]
| | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]

View File

@ -1,9 +1,9 @@
+- #document[@NodeName = "#document"]
+- #declaration[@Name = "xml", @NodeName = "#declaration"]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- root[@NodeName = "root"]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- child[@NodeName = "child", @attr1 = "value1"]
| | +- #text[@Image = "text & entities", @NodeName = "#text", @NormalizedText = "text & entities", @Text = "text & entities"]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
| | +- #text[@NodeName = "#text", @NormalizedText = "text & entities", @Text = "text & entities"]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]

View File

@ -1,83 +1,83 @@
+- #document[@NodeName = "#document"]
+- #comment[@Data = " from https://raw.githubusercontent.com/trailheadapps/lwc-recipes-oss/main/src/modules/ui/app/app.html ", @NodeName = "#comment"]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- template[@NodeName = "template"]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- section[@NodeName = "section", @class = "content container page-background"]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- ui-navbar[@NodeName = "ui-navbar", @nav-items = "{navigationItems}", @oncategorychange = "{handleCategoryChange}", @selected-item = "{currentNavigationItem}"]
| | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n\n "]
| | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n\n "]
| | +- article[@NodeName = "article", @class = "container"]
| | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | +- div[@NodeName = "div"]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.hello.visible}"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-hello[@NodeName = "recipe-hello"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-hello-binding[@NodeName = "recipe-hello-binding"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-hello-expressions[@NodeName = "recipe-hello-expressions"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-hello-expressions-track[@NodeName = "recipe-hello-expressions-track"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-hello-conditional-rendering[@NodeName = "recipe-hello-conditional-rendering"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-hello-for-each[@NodeName = "recipe-hello-for-each"]
| | | | | +- recipe-hello-iterator[@NodeName = "recipe-hello-iterator"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.composition.visible}"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-composition-basics[@NodeName = "recipe-composition-basics"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-composition-iteration[@NodeName = "recipe-composition-iteration"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-composition-contact-search[@NodeName = "recipe-composition-contact-search"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-composition-dynamic[@NodeName = "recipe-composition-dynamic"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.child.visible}"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-event-simple[@NodeName = "recipe-event-simple"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-event-with-data[@NodeName = "recipe-event-with-data"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-event-bubbling[@NodeName = "recipe-event-bubbling"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.parent.visible}"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-api-property[@NodeName = "recipe-api-property"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-api-function[@NodeName = "recipe-api-function"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-api-setter-getter[@NodeName = "recipe-api-setter-getter"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.misc.visible}"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-misc-shared-java-script[@NodeName = "recipe-misc-shared-java-script"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-misc-rest-api-call[@NodeName = "recipe-misc-rest-api-call"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-misc-dom-query[@NodeName = "recipe-misc-dom-query"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-misc-multiple-templates[@NodeName = "recipe-misc-multiple-templates"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.party.visible}"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-libs-d3[@NodeName = "recipe-libs-d3"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- recipe-libs-chartjs[@NodeName = "recipe-libs-chartjs"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- ui-navfooter[@NodeName = "ui-navfooter", @label-next = "{nextNavigationItem}", @label-previous = "{previousNavigationItem}", @onnextclicked = "{handleNavigateNext}", @onpreviousclicked = "{handleNavigatePrevious}"]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
| | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]