···3333Task-level metadata requires Linux's xattr(7) API and a filesystem that supports
3434it. Patches that implement this for other operating systems are welcome.
35353636+tsk expects to run on POSIX-like systems. Microsoft Windows and other
3737+non-UNIX-ey operating systems will never be directly supported.
3838+3639Building
3740--------
38413939-```shell
4242+```sh
4043cargo install --path .
4144```
4245···154157155158Additionally, it should be similar enough to Markdown such that it is easy to
156159export to other applications, as outlined above in the roadmap.
160160+161161+Meanwhile, both Markdown and scdoc have some limitations and make choices that,
162162+while appropriate for their domain, are not appropriate for tsk. Some notable
163163+differences from both:
164164+165165+- There is only one way to do any type of formatting
166166+- Hard line breaks are real, not imaginary
167167+- Most formatting does not cross line boundaries (literal blocks are an
168168+ exception)
169169+- Parseable with a context-free grammar
170170+- Inline formatting control characters must be surrounded by white-space
157171158172A core feature of the format is *linking*. That is, references to other tasks
159173utilizing wiki-link style links: `[[]]`. The content within the link is mapped
···11+#![allow(dead_code)]
22+use url::Url;
33+44+use crate::workspace::Id;
55+66+/// An AST node parsed from the plain-text representation of
77+enum TaskASTNode<'n> {
88+ /// Unmodified text
99+ Plain(&'n str),
1010+ /// Text that has been highlighted using =test= syntax.
1111+ Highlight(Box<TaskASTNode<'n>>),
1212+ /// A standard Markdown-style link
1313+ Link {
1414+ text: Box<TaskASTNode<'n>>,
1515+ to: Url,
1616+ },
1717+ /// An internal link to another task using custom [[tsk-id]] syntax
1818+ InternalLink(Id),
1919+ /// Italicized text using Markdown *text* syntax.
2020+ Italics(Box<TaskASTNode<'n>>),
2121+ /// Bolded text using !text! syntax.
2222+ Bold(Box<TaskASTNode<'n>>),
2323+ /// Underlined text using custom _text_ syntax.
2424+ Underline(Box<TaskASTNode<'n>>),
2525+ /// Strikethrough using -text- syntax
2626+ Strikethrough(Box<TaskASTNode<'n>>),
2727+ /// Unordered list using Markdown * list-item syntax
2828+ UnorderedList(Vec<TaskASTNode<'n>>),
2929+ /// Ordered list using Markdown 1. list-item syntax
3030+ OrderedList(Vec<TaskASTNode<'n>>),
3131+ /// Literal block using markdown triple-backtick syntax.
3232+ Block {
3333+ /// An optional syntax specifier. This *may* be used to apply syntax formatting to contents
3434+ /// in the future
3535+ syntax: Option<&'n str>,
3636+ /// The verbatim content of the block
3737+ content: &'n str,
3838+ },
3939+ /// Literal block using markdown single-backtick syntax.
4040+ InlineBlock(&'n str),
4141+ /// Blockquotes using Markdown > quote syntax
4242+ Blockquote(&'n str),
4343+}
4444+4545+impl<'i> TaskASTNode<'i> {
4646+ fn parse(s: &'i String) -> Result<Vec<TaskASTNode<'i>>, String> {
4747+ let i = 0;
4848+ let mut roots: Vec<TaskASTNode<'i>> = Vec::new();
4949+5050+ todo!();
5151+ }
5252+}
+1
src/workspace.rs
···216216 return Ok(());
217217 }
218218219219+ // unwrap is ok here because we checked above
219220 stack.push(second.unwrap());
220221 stack.push(top.unwrap());
221222 stack.push(third.unwrap());