wikilabs / plugins

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

[Bug] Custom Markup "in text" Parameters overwrite defaults when empty #98

Closed TiddlyTweeter closed 3 years ago

TiddlyTweeter commented 3 years ago

At the moment the "in text" syntax (where a CM rule has a $macrocall) ...

»TEST:"":"pa2"

DELETES the valueS of BOTH _params=:::pa1:::pa2. I was hoping ONLY pa2 would be overwritten as it is the ONLY declared value?

The problem is that the "macro" function here does not behave like other TW macros that respect a default value unless explicitly overwritten ...

pmario commented 3 years ago

hmmmm, Yea, probably a bug.

TiddlyTweeter commented 3 years ago

Ciao PMario. I finished a lot of other work and want to get back to Custom Markup in real production wiki! CM is brilliant!

Question: Is this issue any closer to resolution :-)

The reason I ask is that I will be making production wiki that I hope would, not, later break on CM plugin changes?

I hope this message is clear! Best wishes TT

pmario commented 3 years ago

Hi TT. Yea I wanted to work on CM again. .. Now there are 2 elements in the core which I was waiting for.

The "comment pragma" is no part of the core but it looks like this: <!-- comment --> So HTML comment and pragma comment are the same thing now. This will be different to the \\ comment in CM I think I'll remove \\. We may use it for something else.

The "keyboard widget" got an update. So I can remove my custom one from CM.

The "radio widget" also got an update. So I should be able to user the core one.

The last 2 element's won't be important for you. They are internal only.

pmario commented 3 years ago

And I need to publish the new dropdown

grafik

and the new configuration

grafik

pmario commented 3 years ago

Yea and this issue needs a fix

TiddlyTweeter commented 3 years ago

My main concern was how CM passes parameters. At the moment it deletes anything unless you define it explicitly. I think my OP in this thread got the point? The point being to have it behave more like a normal TW macro? I.e. that null values inherit from \define.

For practical purposes all I need to know is "do I have to live with that?" OR "can I hope that future CM params from Wiki-Text will work as in standard macros?"

pmario commented 3 years ago

IMO it's a bug. I'll change that

TiddlyTweeter commented 3 years ago

IMO it's a bug. I'll change that

Thankyou! It would make my life easier! As far as I can see it is the only real obstacle to using CM now in production wiki.

TiddlyTweeter commented 3 years ago

Great news! Thanks!

pmario commented 3 years ago

@TiddlyTweeter Sorry for the delay, but the new version V0.11.6 should be online now. The dropdown mentioned is there for block-pragmas. inline-dropdown has to be done.