Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] toc-macros have still 1 text substitution: $sort$ -- So caching is prevented #6826

Open
pmario opened this issue Jul 25, 2022 · 5 comments

Comments

@pmario
Copy link
Contributor

pmario commented Jul 25, 2022

Describe the bug

As the title says: toc-macros have still 2 text substitution: $sort$ and $unselectedText$ -- So caching is disabled

It is hard to fix, since the sort parameter is not a "valid filter" string by itself. It is only a partial eg: sort[title] as shown in the docs

sort
An optional extra filter step, e.g. sort[title]

@Jermolene @saqimtiaz ... Any ideas

Expected behavior

No response

To Reproduce

No response

Screenshots

image

TiddlyWiki Configuration

V 5.2.3-pre

Additional context

No response

@pmario
Copy link
Contributor Author

pmario commented Jul 25, 2022

Just found $unselectedText$ too. OP updated

@saqimtiaz
Copy link
Contributor

@pmario I have the same problem in some of my own work.

We should consider deprecating older macros - for instance timeline as well - that use text substitution and filter steps as parameters once we have #6666 merged, which will also give us the flexibility of custom filter operators. We can provide newer optimized macros as an alternative.

#6423 was also prompted by the desire to avoid text substitution in filters when needing to switch between !sort[] and sort[]

@Jermolene
Copy link
Owner

Hi @pmario I think @saqimtiaz is correct, we will have to eventually deprecate core macros that require text substitution.

@pmario
Copy link
Contributor Author

pmario commented Jul 28, 2022

Hi @pmario I think @saqimtiaz is correct, we will have to eventually deprecate core macros that require text substitution.

hmmm. ... We do have a deprecated function since April 2018 ... but it is still part of the core.

@Jermolene
Copy link
Owner

hmmm. ... We do have a deprecated function since April 2018 ... but it is still part of the core.

That's the plan! The idea is that we gradually deprecate more and and more of the old stuff until we get to the point where it is worthwhile jettisoning the old stuff. The deprecation is gradual, but the jettisoning should be a big bang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants