wikilabs / plugins

TW5 plugins: https://wikilabs.github.io
30 stars 8 forks source link

Minor BUG? - Repeated Styles Inserted Into Tag IF `ID` has `symbol` AND `_classes=` not set #64

Closed pmario closed 3 years ago

pmario commented 3 years ago

Minor BUG? - Repeated Styles Inserted Into Tag IF ID has symbol AND _classes= not set

IF you assign a "symbol" to an ID but leave _classes= UNdefined then styles get REPEATED IF you enter them from text. That does NOT happen if you create _classes= in the pragma.

This shows the issue: /°TEST.repeated-style appears twice °/

... customise ...

\customise slash=TEST 

... render ...

<p>This shows the issue: <span class="repeated-style repeated-style wltc-inline wltc">appears TWICE</span></p>

Originally posted by @TiddlyTweeter in https://github.com/wikilabs/plugins/discussions/62#discussioncomment-376204

TiddlyTweeter commented 3 years ago

Ciao PMario, I notice you updated and the "repeated class" problem is gone. But it looks like a different one now happens. It happens when you make a pragma without a "_classes=" set (not empty, just not present) ... you can see the issue below ...

\customise angle=SYM _element=p _classes=""

»SYM.test

Result ..., OK <p class="test wltc-l1 wltc"></p>

\customise angle=SYM _element=p 

»SYM.test

Result, "undefined" class is added and appended to "test" class :-(. <p class="testundefined wltc-l1 wltc"></p>

pmario commented 3 years ago

Sorry! Bad testing. Next version will fix it soon!