feat(spellcheck): ignore links for spellchecking (#6722)
Reviewed-by: pajlada <rasmus.karlsson+github@pajlada.com> Reviewed-by: Mm2PL <mm2pl+gh@kotmisia.pl>
This commit is contained in:
+1
-1
@@ -76,7 +76,7 @@
|
||||
- Dev: Unwrapped `LimitedQueueSnapshot` to `std::vector`. (#6606)
|
||||
- Dev: Simplified uses of `getMessageSnapshot`. (#6607)
|
||||
- Dev: Disabled `llvm-prefer-static-over-anonymous-namespace` in clang-tidy. (#6610)
|
||||
- Dev: Added experimental spell checker support. (#6446, #6703)
|
||||
- Dev: Added experimental spell checker support. (#6446, #6703, #6722)
|
||||
- Dev: Added Clazy linting in CI. (#6623)
|
||||
- Dev: Added custom clang-tidy module linting in CI. (#6626)
|
||||
- Dev: CMake option `USE_ALTERNATE_LINKER` now errors if the given linker can't be found. (#6692)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "Application.hpp"
|
||||
#include "common/Aliases.hpp"
|
||||
#include "common/LinkParser.hpp"
|
||||
#include "controllers/accounts/AccountController.hpp"
|
||||
#include "controllers/spellcheck/SpellChecker.hpp"
|
||||
#include "messages/Emote.hpp"
|
||||
@@ -49,11 +50,18 @@ bool isIgnoredWord(TwitchChannel *twitch, const QString &word)
|
||||
return true;
|
||||
}
|
||||
|
||||
return getApp()
|
||||
->getAccounts()
|
||||
->twitch.getCurrent()
|
||||
->twitchEmote(name)
|
||||
.has_value();
|
||||
if (getApp()
|
||||
->getAccounts()
|
||||
->twitch.getCurrent()
|
||||
->twitchEmote(name)
|
||||
.has_value())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
// TODO: Replace this with a link parser variant that doesn't return the parsed data
|
||||
auto link = linkparser::parse(word);
|
||||
return link.has_value();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user