mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-12-17 23:04:06 +00:00
syntaticly space is more reasonable than remove directly.
This commit is contained in:
parent
faa1ee480c
commit
3ed7ce5ccb
|
@ -149,7 +149,7 @@ QString unescape( QString const & str, bool saveFormat )
|
||||||
{
|
{
|
||||||
tmp.replace( QRegularExpression( "<(?:\\s*/?(?:div|h[1-6r]|q|p(?![alr])|br|li(?![ns])|td|blockquote|[uo]l|pre|d[dl]|nav|address))[^>]{0,}>",
|
tmp.replace( QRegularExpression( "<(?:\\s*/?(?:div|h[1-6r]|q|p(?![alr])|br|li(?![ns])|td|blockquote|[uo]l|pre|d[dl]|nav|address))[^>]{0,}>",
|
||||||
QRegularExpression::CaseInsensitiveOption ), " " );
|
QRegularExpression::CaseInsensitiveOption ), " " );
|
||||||
tmp.remove( QRegularExpression( "<[^>]*>" ) );
|
tmp.replace( QRegularExpression( "<[^>]*>"), " ");
|
||||||
|
|
||||||
}
|
}
|
||||||
return QTextDocumentFragment::fromHtml( tmp.trimmed() ).toPlainText();
|
return QTextDocumentFragment::fromHtml( tmp.trimmed() ).toPlainText();
|
||||||
|
|
Loading…
Reference in a new issue