Don't guess mentions from text within code blocks #78
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: cadence/out-of-your-element#78
Loading…
Add table
Add a link
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?
Currently guessed mentions are processed over the whole message by a regexp, but this has the problem that it also processes them inside markdown code blocks. They shouldn't be processed in code blocks because regular mentions wouldn't be processed there either.
It is not possible to parse the Markdown code block format with regex, so this would have to be done in a real parser. Possibilities:
transformParsedVia, which also works over the parsed markdown AST but async functions can actually be called here.@cloudrac3r/discord-markdownlibrary to add another hook for something something plaintext (like autolink), or move the @mention guessing regexp into there and add a hook for themaximumWrittenSection.Guessed mentions are also known as "scenario 3" in code.