fix notepad incorrectly triggering and having wrong html
This commit is contained in:
parent
feceb9aa99
commit
c9e4e864c3
@ -5,7 +5,8 @@ use crate::engines::{EngineResponse, SearchQuery};
|
||||
use super::regex;
|
||||
|
||||
pub fn request(query: &SearchQuery) -> EngineResponse {
|
||||
if !regex!("(note|text|code) ?(pad|book|edit(or|er)?)").is_match(&query.query.to_lowercase()) {
|
||||
if !regex!("^(note|text|code) ?(pad|book|edit(or|er)?)$").is_match(&query.query.to_lowercase())
|
||||
{
|
||||
return EngineResponse::new();
|
||||
}
|
||||
|
||||
@ -13,6 +14,6 @@ pub fn request(query: &SearchQuery) -> EngineResponse {
|
||||
// `contenteditable="plaintext-only"` attribute currently only works on Chrome.
|
||||
// This should be updated when the attribute becomes available in more browsers
|
||||
EngineResponse::answer_html(html! {
|
||||
div."answer-notepad" contenteditable="plaintext-only" {}
|
||||
div."answer-notepad" contenteditable {}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user