There seems to be a limitation of BBEdit persistent includes that I haven't
been able to find a way around. I wonder if anyone else has hit this wall, and
if so, if you've gotten past it.
Here is a web page in my site (in its entirety):
<!-- #bbinclude "Case Index Page" #SORT_BY#="Date" -->
<!-- end bbinclude -->
The "Case Index Page" include file contains this:
<!-- #bbinclude "case_index.swift" #SORT_BY_CI#="#SORT_BY#" -->
<!-- end bbinclude -->
The nested include includes a script whose behavior depends on the value of its
#SORT_BY_CI# parameter. I was expecting that BBEdit would substitute the value,
"Date", for the reference "#SORT_BY#" in the nested include, so that
case_index.swift would see "Date" as the value of #SORT_BY_CI#.
But apparently BBEdit does parameter substitution on the expansion of the
nested include, not on the include itself. Thus, the included script sees the
value of its #SORT_BY_CI# parameter as the string "#SORT_BY#".
In short, where a persistent-included text file contains a persistent includes
of a script, there doesn't seem to be any way to make the behavior of the
script depend on the parameters to the include of the text file.
Am I missing something?
Thanks,
Neil Faiman
--
This is the BBEdit Talk public discussion group. If you have a feature request
or need technical support, please email "[email protected]" rather than
posting here. Follow @bbedit on Twitter: <https://twitter.com/bbedit>
---
You received this message because you are subscribed to the Google Groups
"BBEdit Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/bbedit/61EF0A60-CE5C-4C86-941A-1AC031AECF63%40faiman.org.