Closed pmario closed 3 years ago
@TiddlyTweeter ... I did a test with :::
in the pragma definition section and I did change the splitter for "local params" to :"
see:
Have a very close look at line 1 ... What do you think?
\customize degree=blockquote _element="$macrocall" $name="test" _2="url" _1="citeTxt" _mode=block _endString="---" _params=":::external link:::https://example.com"
\define test(src, citeTxt, url)
<blockquote cite="""$url$""">
$src$
<cite><a class="tc-tiddlylink-external" href="""$url$""" rel="noopener noreferrer" target="_blank">$citeTxt$</a></cite>
</blockquote>
\end
°blockquote
the cite links to example.com, which is defined in the `_params` attribute in the pragma. The link text is also defined in the pragma
---
°blockquote:"a different link text"
the cite links to example.com
The "local" text wins over the pragma text
---
°blockquote:"new text - new link":"https://tiddlywiki.com"
Both params are defined with the cm-call
---
fixed - close
@TiddlyTweeter ... New version is uploaded! ... Other issues tagged "custom-markup" should follow. ... BUT they shouldn't contain breaking changes. .... I think ;)
... I did change the splitter for "local params" to
:"
...@TiddlyTweeter ... New version is uploaded! ... Other issues tagged "custom-markup" should follow. ... BUT they shouldn't contain breaking changes. .... I think ;)
Great! I'll actively test that today. TT
I have tested with the new method for passing _1
and _2
and it works WELL.
In my use cases I'm mainly dynamically passing attributes into tags. I did test how it handles quote marks. Since HTML attributes will take single quotes it is never likely to be an issue for me. I did test with quite extensive paramater passing into tags like this:
»CONSOLE:"fred='unreal: style1; real: style2.2' style='font-size:.85rem;width:28rem;margin:auto;'"
Works fine! Tx!
Issue With Colon (:) In Parameter Passing ??
I discovered in trial and error that the new method of passing parameters
<glyph>:"<param>"
works well EXCEPT for colons inside the quoted parameter string where it seems to break. That is an issue in use cases where you really need to be able to pass colons. Here is an example where I wanted to create a short-hand way to invoke a modal. It works well for Tiddlers with NO colons, but breaks for any Tiddler that has a colon in its name :-( ...Q: @pmario Is there anyway around this problem?
Originally posted by @TiddlyTweeter in https://github.com/wikilabs/plugins/discussions/62#discussioncomment-435710