-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support arbitrary extensions #10
Comments
That seems reasonable, I'm looking for the counter case here though. Is I wonder if we should implement an extension system that allows for deeper parsing/composition hooks, of which a key:value extension could be one. Thoughts @bartlibert? |
What kind of deeper parsing are you thinking of?
|
If I were going to implement from scratch, I think I would use this data structure, which I will describe in examples instead of words because js arrays are "wonderful".
|
No clue! Just wondering if it was a thing.
In that case, yes, we should support it explicitly. |
I think we should move the extension parsing into the main body, but I would still like to include the possibility of explicit extensions including their own logic on top, i.e. the |
I agree that it would be nice to have support for extensions like hidden, due, threshold... but why not provide those in another library that wraps this one? eg, Or we could provide those as utility methods that aren't baked into the object, like render. Or include it in this library, as a separate object |
Rather than just having support for hidden and due extensions and adding additional extensions as they are requested, we could add an
extensions
data member that is an array/object using key:value pairs, where the key is the extension and the value is an array of values for that extensionSo,
example task dep:1 dep:2 h:1
would parse toIt allows anyone using the jsTodoTxt to implement their own custom extensions without building in behavior that breaks the todo.txt standard (or having to do other people's work for them, if they want to use this to parse tasks and support their own custom extension).
The text was updated successfully, but these errors were encountered: