Skip to content
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

text in code blocks is treated as commands #412

Open
kristersd opened this issue Sep 17, 2024 · 1 comment
Open

text in code blocks is treated as commands #412

kristersd opened this issue Sep 17, 2024 · 1 comment

Comments

@kristersd
Copy link
Contributor

kristersd commented Sep 17, 2024

Text written in code blocks is treated as commands. We should ignore code blocks, for example, to avoid triggering the bot when the user has:

if (!auth) {}

Implementation details:

  • Ignore text fragments which are written in code blocks.
@kristersd kristersd changed the title text in code blocks are treated as commands text in code blocks is treated as commands Sep 17, 2024
@vcarl
Copy link
Member

vcarl commented Sep 17, 2024

There's an existing string helper that "simplifies" text by stripping diacriticals, emoji, and whitespace (it gets used in the track logic to determine if something is "the same message" for tracking purposes across channels). This makes sense to me as another string helper, a filter pass to remove irrelevant text before it gets processed by other logic. Quoted text probably also good to ignore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants