Fix formatting of invalid regex error
Preserve whitespace, special characters and use monospace font.
This commit is contained in:
parent
9ba02b5ca6
commit
2078a094f4
@ -158,7 +158,7 @@ impl AnkiError {
|
||||
SearchErrorKind::InvalidPropOperator(ctx) => i18n
|
||||
.trn(TR::SearchInvalidPropOperator, tr_strs!["val"=>(ctx)])
|
||||
.into(),
|
||||
SearchErrorKind::Regex(text) => text.into(),
|
||||
SearchErrorKind::Regex(text) => format!("<pre>`{}`</pre>", text.replace('`', "'")).into(),
|
||||
SearchErrorKind::Other(Some(info)) => info.into(),
|
||||
SearchErrorKind::Other(None) => i18n.tr(TR::SearchInvalidOther),
|
||||
SearchErrorKind::InvalidNumber { provided, context } => i18n
|
||||
|
Loading…
Reference in New Issue
Block a user