xciml updated this revision to Diff 40467. xciml marked an inline comment as done. xciml added a comment.
In D14236#315639 <https://phabricator.kde.org/D14236#315639>, @cullmann wrote: > I am not sure about the default argument for title, why not just have there QString() and in the code instead of isNull() an isEmpty => use file name fallback. I'm not sure what you meant by this, did I get it right? I defaulted to a QStringLiteral in the header to make it clear what the default behaviour would be, but this does make it simpler to work with. I also realised that since user input is taken, the title would have to be HTML escaped, so it works out. > The definitionForMimeType must perhaps use the priority, too, if there are duplicates, like the definitionForFileName function. I did run into this problem, without checking the priority, the program would return a random match. This should fix it. Thanks for pointing that out! REPOSITORY R216 Syntax Highlighting CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D14236?vs=39700&id=40467 REVISION DETAIL https://phabricator.kde.org/D14236 AFFECTED FILES src/cli/kate-syntax-highlighter.cpp src/lib/htmlhighlighter.cpp src/lib/htmlhighlighter.h src/lib/repository.cpp src/lib/repository.h To: xciml, #framework_syntax_highlighting, vkrause Cc: cullmann, pino, kde-frameworks-devel, kwrite-devel, #framework_syntax_highlighting, bmortimer, michaelh, genethomas, kevinapavew, ngraham, bruns, demsking, vkrause, sars, dhaumann