<table><tr><td style="">kossebau added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D25323">View Revision</a></tr></table><br /><div><div><p>Thanks for looking at the issue. No time to look closer the next days, but curious about this partial change (which has been discussed before and discarded):<br />
changing <tt style="background: #ebebeb; font-size: 13px;">QColor ( 245, 245, 245 ); // light-grey background </tt> to <tt style="background: #ebebeb; font-size: 13px;">highlightingTheme.editorColor(KSyntaxHighlighting::Theme::EditorColorRole::BackgroundColor)</tt> implies, one cannot use KSyntaxHighlighting to render text highlighted e.g. for a print-out on a paper (or only for a PDF). Compare e.g. the example <a href="https://phabricator.kde.org/source/syntax-highlighting/browse/master/examples/codepdfprinter/" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/source/syntax-highlighting/browse/master/examples/codepdfprinter/</a>. <br />
Is this change for background needed to make that rehighlight approach working?</p>

<p>For the rest, a not existing definition might be something other users of KSyntaxHighlighting might run into as well, so that use-case should be ideally supported by concepts in their API already (or at least ve documented how one is supposed to deal with that case), The proposed work-around code here does not look long-term stable, calling <tt style="background: #ebebeb; font-size: 13px;">rehighlight</tt> seems to just work by chance currently to gain whatever effect (which effect does it have actually?), But as code for human readers it makes little sense. Having to have some non-code comment makes that even more clear something in KSyntaxHighlighting API is not supporting us here.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R320 KIO Extras</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D25323">https://phabricator.kde.org/D25323</a></div></div><br /><div><strong>To: </strong>meven, kossebau, cullmann, vkrause<br /><strong>Cc: </strong>kde-frameworks-devel, kfm-devel, pberestov, iasensio, fprice, LeGast00n, MrPepe, fbampaloukas, alexde, GB_2, Codezela, feverfew, meven, michaelh, spoorun, navarromorales, firef, ngraham, andrebarros, bruns, emmanuelp, mikesomov<br /></div>