Skip to content

Commit

Permalink
fix: mdx title should be respected
Browse files Browse the repository at this point in the history
xiaoyifang committed Jul 4, 2024
1 parent 2053511 commit ca4d59b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dict/mdictparser.cc
Original file line number Diff line number Diff line change
@@ -372,7 +372,7 @@ bool MdictParser::readHeader( QDataStream & in )
// Read metadata
rtl_ = headerAttributes.namedItem( "Left2Right" ).toAttr().value() != "Yes";
QString title = headerAttributes.namedItem( "Title" ).toAttr().value();
if ( title.isEmpty() || title.length() < 5 || title == "Title (No HTML code allowed)" ) {
if ( title.isEmpty() ) {
// Use filename instead
QFileInfo fi( filename_ );
title_ = fi.baseName();

0 comments on commit ca4d59b

Please sign in to comment.