Open thombruce opened 1 month ago
Toodles VSCode should also feature decorations for inline Markdown styles:
**strong**
_em_
[link](https://example.com/)
<https://example.com/>
https://example.com/
(valid https?
url displaying as a link rather than a tag)`code`
Ideally we might import some other third-party decorator logic to handle this, rather than handling it all with our own regexes... which could get messy.
This is done for packages/app.
Not yet implemented for packages/vscode.
Feature request
I recently added loose support for Markdown to my own site here: b023b6e2c45affe077c876d15422402428bb131c
The CSS is a mess, but that wouldn't necessarily be an issue for the VSCode package.
Consider adjusting the VSCode package so that it explicitly supports inline Markdown:
code
Most of this is already implicitly fine. The main issue is the colon in a link:
[link](https://example.com)
.http://...
conflicts with out current regex fortag:example
.Consider not matching tags if the word characters preceding
:
are themselves preceded by](
and/or if the colon is followed by//
(though check the official specs for URL form before committing to this).Here's an illustration of valid URI formats:
As shown, the authority part (which is delimited by
//
) can be skipped. Therefore, the most basic acceptable URL is something like:This is identical to our most basic tag.
We cannot even check ahead for the closing
)
appearing before any space character because this too is a valid markdown link:And strictly something like this should also be valid:
One very simple option is to just say... your tags should be preceded by a space character... but this would mean the user couldn't ever put tags in parentheses, perhaps for grouping them...
Not matching a tag if it's preceded by
](
is really looking like the best option. We know that that's probably a markdown link - it's a good indicator. It isn't guaranteed, but we should be safe except for extreme edge cases.Alternatively, we could not treat the
\w+:\S+
pattern as a tag if it matched...https?://
- this would essentially be special treatment for "standard" links, and would ignore link kinds like ftp, mailto, file, etc. That said, mailto stands out as a very reasonable kind of link to permit in a todo list. You can imagine a todo like:So yes... give it some more thought, but I think I'd be quite happy moving forwards with just the approach of ignoring tags that are preceded by
](
(strong indication of being a markdown link) or indeed by<
which is again indicative of a markdown link (e.g.<mailto:alan@example.com>
).Also keep in mind that there are plans to expand the capabilities of tags in the future with formats similar to:
time[t]:1h23m
count[c]:456
The idea being that these are dynamic tags which Toodles (and other third party applications) could add interactive timers/tally systems to, and the like.
Code of Conduct