Skip to content

Commit

Permalink
opt: beautify the layout of dictserver output
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Dec 7, 2024
1 parent 54a4bda commit 61efd1d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dict/dictserver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -604,12 +604,12 @@ class DictServerArticleRequest: public Dictionary::DataRequest
QStringList resultStr;

// proccess the line
QRegularExpression re( "^\\d{3} " );
static QRegularExpression leadingRespCode( "^\\d{3} " );
uint32_t leadingSpaceCount = 0;
uint32_t firstLeadingSpaceCount = 0;
for ( const QString & line : lines ) {
//ignore 15X lines
if ( re.match( line ).hasMatch() ) {
if ( leadingRespCode.match( line ).hasMatch() ) {
continue;
}
// ignore . endline
Expand Down

0 comments on commit 61efd1d

Please sign in to comment.