Switch to using bracket depth from OrgSource instead of from the context for footnote references.

It is currently unknown if this will produce a performance increase, but unless it has a significant performance penalty we are going to go forward with this change because it makes it more explicit which values need to be read deeply from other elements (therefore needing to be in the context) vs values that can be bound to the exit matcher since they are only used within the confines of the current element.

I suspect we will get a performance boost since it will be reducing the nodes that need to be walked in the context but maintaining bracket depth count over the entire document instead of only inside elements that need balanced brackets could cost us.
This commit is contained in:
Tom Alexander
2023-08-28 00:24:27 -04:00
parent f11f7bcc73
commit ec813e3b3f
3 changed files with 28 additions and 74 deletions

View File

@@ -0,0 +1,2 @@
[fn:2:This footnote [ has balanced ] brackets inside it]
[fn::This footnote does not have balanced [ brackets inside it]