[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
4 changed files with 60 additions and 65 deletions

View File

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

View File

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

View File

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

View File

@ -1,83 +1,83 @@
+- #document[@NodeName = "#document"] +- #document[@NodeName = "#document"]
+- #comment[@Data = " from https://raw.githubusercontent.com/trailheadapps/lwc-recipes-oss/main/src/modules/ui/app/app.html ", @NodeName = "#comment"] +- #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"] +- template[@NodeName = "template"]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- section[@NodeName = "section", @class = "content container page-background"] | +- 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}"] | | +- ui-navbar[@NodeName = "ui-navbar", @nav-items = "{navigationItems}", @oncategorychange = "{handleCategoryChange}", @selected-item = "{currentNavigationItem}"]
| | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n\n "] | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n\n "]
| | +- article[@NodeName = "article", @class = "container"] | | +- article[@NodeName = "article", @class = "container"]
| | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | +- div[@NodeName = "div"] | | | +- div[@NodeName = "div"]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.hello.visible}"] | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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-for-each[@NodeName = "recipe-hello-for-each"]
| | | | | +- recipe-hello-iterator[@NodeName = "recipe-hello-iterator"] | | | | | +- recipe-hello-iterator[@NodeName = "recipe-hello-iterator"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.composition.visible}"] | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- recipe-composition-dynamic[@NodeName = "recipe-composition-dynamic"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.child.visible}"] | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- recipe-event-bubbling[@NodeName = "recipe-event-bubbling"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.parent.visible}"] | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- recipe-api-setter-getter[@NodeName = "recipe-api-setter-getter"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.misc.visible}"] | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- 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"] | | | | | +- recipe-misc-multiple-templates[@NodeName = "recipe-misc-multiple-templates"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- template[@NodeName = "template", @if:true = "{navigationItems.party.visible}"] | | | | +- 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"] | | | | | +- 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"] | | | | | +- recipe-libs-chartjs[@NodeName = "recipe-libs-chartjs"]
| | | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | | +- #text[@Image = " ", @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}"] | | | | +- ui-navfooter[@NodeName = "ui-navfooter", @label-next = "{nextNavigationItem}", @label-previous = "{previousNavigationItem}", @onnextclicked = "{handleNavigateNext}", @onpreviousclicked = "{handleNavigatePrevious}"]
| | | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| | +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n "] | | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n "]
| +- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"] | +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]
+- #text[@Image = " ", @NodeName = "#text", @NormalizedText = " ", @Text = "\n"] +- #text[@NodeName = "#text", @NormalizedText = " ", @Text = "\n"]