diff --git a/package.json b/package.json index 18e1c98..cc5eec3 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leuffen/jodastyle", - "version": "3.0.1", + "version": "3.0.2", "description": "", "main": "./dist/index.js", "module": "./dist/index.module.js", diff --git a/src/component/joda-content-element.ts b/src/component/joda-content-element.ts index 4c9984c..4032d1b 100644 --- a/src/component/joda-content-element.ts +++ b/src/component/joda-content-element.ts @@ -76,10 +76,13 @@ export class JodaContentElement extends HTMLElement { if (jodaSiteConfig.disable_templates) { this.setLoaded(); + // For documentation: Add Class and Tag-Names + if(jodaSiteConfig.debug_visualize && jodaSiteConfig.debug_visualize_attribute) { + (new Jodavisualize()).process(this as HTMLElement); + } return; } - // Process the content let jodaStyle = new Jodastyle(logger); await jodaStyle.process(this as HTMLElement); diff --git a/src/processor/jodastyle-commands.ts b/src/processor/jodastyle-commands.ts index 59bbeec..c0e43e5 100644 --- a/src/processor/jodastyle-commands.ts +++ b/src/processor/jodastyle-commands.ts @@ -148,10 +148,6 @@ jodaStyleCommands["--joda-use"] = async(value : string, target, element : HTMLEl }); let newElement = await getTemplateFilledWithContent(value, placeholder, element); - console.log("new: ", newElement, newElement.firstElementChild); - - - let firstElement = newElement.firstElementChild; firstElement["joda-style-processed"] = true; // Set style as processed (to prevent double processing) @@ -162,7 +158,7 @@ jodaStyleCommands["--joda-use"] = async(value : string, target, element : HTMLEl element.getAttributeNames().forEach((attrName) => { - // copy attributes but. Append class and styles + // copy attributes but. Append class and styles if (attrName === "class") { firstElement.setAttribute(attrName, element.getAttribute(attrName) + " " + firstElement.getAttribute(attrName) ?? ""); return;