Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dermatthes committed Oct 2, 2023
1 parent 67a4b8d commit d2b1209
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
5 changes: 4 additions & 1 deletion src/component/joda-content-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 1 addition & 5 deletions src/processor/jodastyle-commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand All @@ -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;
Expand Down

0 comments on commit d2b1209

Please sign in to comment.