mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 19:24:08 +00:00
[autofix.ci] apply automated fixes
This commit is contained in:
parent
a3d7c89563
commit
fd94f31209
|
@ -748,8 +748,8 @@ void StardictDictionary::pangoToHtml( QString & text )
|
||||||
else if ( style.compare( "font_size", Qt::CaseInsensitive ) == 0
|
else if ( style.compare( "font_size", Qt::CaseInsensitive ) == 0
|
||||||
|| style.compare( "size", Qt::CaseInsensitive ) == 0 ) {
|
|| style.compare( "size", Qt::CaseInsensitive ) == 0 ) {
|
||||||
if ( cap2[ 0 ].isLetter() || cap2.endsWith( "px", Qt::CaseInsensitive )
|
if ( cap2[ 0 ].isLetter() || cap2.endsWith( "px", Qt::CaseInsensitive )
|
||||||
|| cap2.endsWith( "pt", Qt::CaseInsensitive )
|
|| cap2.endsWith( "pt", Qt::CaseInsensitive ) || cap2.endsWith( "em", Qt::CaseInsensitive )
|
||||||
|| cap2.endsWith( "em", Qt::CaseInsensitive ) || cap2.endsWith( "%" ) )
|
|| cap2.endsWith( "%" ) )
|
||||||
newSpan += QString( "font-size:" ) + cap2 + ";";
|
newSpan += QString( "font-size:" ) + cap2 + ";";
|
||||||
else {
|
else {
|
||||||
int size = cap2.toInt();
|
int size = cap2.toInt();
|
||||||
|
@ -831,8 +831,7 @@ void StardictDictionary::pangoToHtml( QString & text )
|
||||||
newSpan += QString( "text-decoration-line:none;" );
|
newSpan += QString( "text-decoration-line:none;" );
|
||||||
}
|
}
|
||||||
else if ( style.compare( "rise", Qt::CaseInsensitive ) == 0 ) {
|
else if ( style.compare( "rise", Qt::CaseInsensitive ) == 0 ) {
|
||||||
if ( cap2.endsWith( "px", Qt::CaseInsensitive )
|
if ( cap2.endsWith( "px", Qt::CaseInsensitive ) || cap2.endsWith( "pt", Qt::CaseInsensitive )
|
||||||
|| cap2.endsWith( "pt", Qt::CaseInsensitive )
|
|
||||||
|| cap2.endsWith( "em", Qt::CaseInsensitive ) || cap2.endsWith( "%" ) )
|
|| cap2.endsWith( "em", Qt::CaseInsensitive ) || cap2.endsWith( "%" ) )
|
||||||
newSpan += QString( "vertical-align:" ) + cap2 + ";";
|
newSpan += QString( "vertical-align:" ) + cap2 + ";";
|
||||||
else {
|
else {
|
||||||
|
@ -842,8 +841,7 @@ void StardictDictionary::pangoToHtml( QString & text )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( style.compare( "letter_spacing", Qt::CaseInsensitive ) == 0 ) {
|
else if ( style.compare( "letter_spacing", Qt::CaseInsensitive ) == 0 ) {
|
||||||
if ( cap2.endsWith( "px", Qt::CaseInsensitive )
|
if ( cap2.endsWith( "px", Qt::CaseInsensitive ) || cap2.endsWith( "pt", Qt::CaseInsensitive )
|
||||||
|| cap2.endsWith( "pt", Qt::CaseInsensitive )
|
|
||||||
|| cap2.endsWith( "em", Qt::CaseInsensitive ) || cap2.endsWith( "%" ) )
|
|| cap2.endsWith( "em", Qt::CaseInsensitive ) || cap2.endsWith( "%" ) )
|
||||||
newSpan += QString( "letter-spacing:" ) + cap2 + ";";
|
newSpan += QString( "letter-spacing:" ) + cap2 + ";";
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Reference in a new issue