So, this is the next step of the equation. Like you mention, ::
followed by the specified date format ([[...]]
or {{...}}
) is one way we can narrow down the amount of work we have to do to detect these dates, and detecting what’s before ::
also serves as an easy way to detect the date’s label.
To put it in pseudo code, we could say something along the lines of:
- Detect 1 or more non-space characters followed by two colons, make this the label
- After that, look for 0 or more spaces followed by square or curly brackets
- Grab everything else until the corresponding closing brackets, make this the date (if it’s in the correct date format)
The problem with this is that it’s not very efficient. We’d also have to look at things like link-to-page:: [[My Page]]
just to verify that it doesn’t match what we’re looking for.
The more unique we can make our formatting, the faster it will be to parse. So, even something like this would make our lives easier @due:: [[2021-11-02]]
because now we can change the first bullet above to:
- Detect 1
@
character followed by 1 or more non-space characters followed by two colons, make this the label
This means we can skip all words that don’t begin with @
. The other benefit of having some special character is that it can help users see that these key/value combos have unique meaning in relation to other dataview metadata.
Does this help clarify what you were asking?