Move to a real markdown parser #1
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There is https://akkoma.dev/sfr/marked-mfm, though it may need changes or forking for use.
Another possibility is forking https://github.com/commonmark/commonmark.js or writing a moo+nearley parser, but this should only be considered if neither of the above work (commonmark is not a particularly easy to parse language).
I think this would be a chance to rework recognition of mentions which is currently a bit annoying because of recognizing mentions where it should not. For example in shell prompts, email addresses and matrix handles.
I think we could use this JavaScript
RegExp
to find mentions in a piece of text:Perhaps it would also make sense to refactor the API for creating notes a bit: Replace the
noExtractMentions
parameter with something where you can pass in a list of mentions (and maybe their text representation separately like in ActivityStreamstag
by convention?). If we want to do that we could also pass in a list of mentions into the MFM parser to make it understand if something should be recognized as a mention or not.Also checking if a mention extracted with the regex are accounts that actually exist.
Oop that was another
#1
I guess.I think a good first step would be to render Pages as Markdown, since that does not require any server side processing.