<table><tr><td style="">mwolff requested changes to this revision.<br />mwolff added a comment.<br />This revision now requires changes to proceed.
</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/D17693">View Revision</a></tr></table><br /><div><div><p>Ok, that behavior you describe is bad. I would get annoyed by that, esp. since the list of chars that you use are totally language specific.</p>
<p>If you want to get this behavior for Markdown, then we need to store that data in the syntax file and make it accessible at this position. in the <tt style="background: #ebebeb; font-size: 13px;"><general></tt> section we already define how single/multiline comments are handled. We would need something similar for this feature, e.g. add something like the following and make it accessible through the syntax-highlighting API:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><general>
<brackets>
<bracket open="(" close=")" />
<bracket open="[" close="]" />
<bracket open="{" close="}" />
<bracket open="<" close=">" />
<bracket open=""" close=""" />
<bracket open="'" close="'" />
<bracket open="´" close="´" />
<bracket open="`" close="`" />
<bracket open="_" close="_" />
<bracket open="." close="." />
<bracket open="," close="," />
<bracket open=";" close=";" />
<bracket open=":" close=":" />
<bracket open="|" close="|" />
<bracket open="-" close="-" />
<bracket open="+" close="+" />
<bracket open="^" close="^" />
<bracket open="°" close="°" />
<bracket open="&" close="&" />
<bracket open="#" close="#" />
<bracket open="@" close="@" />
<bracket open="~" close="~" />
<bracket open="*" close="*" />
<bracket open="!" close="!" />
<bracket open="?" close="?" />
<bracket open="$" close="$" />
<bracket open="§" close="§" />
<bracket open="%" close="%" />
<bracket open="/" close="/" />
<bracket open="\" close="\" />
<bracket open="=" close="=" />
</brackets>
</general></pre></div>
<p>Of course the initial, common, brackets should be the implicit default when no <tt style="background: #ebebeb; font-size: 13px;"><brackets></tt> group is specified in a language file. And then we probably need more meta data that specified that some of the brackets above only should be added when we have a selection. Just add a <tt style="background: #ebebeb; font-size: 13px;">requiresSelection</tt> or similar attribute?</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R39 KTextEditor</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D17693">https://phabricator.kde.org/D17693</a></div></div><br /><div><strong>To: </strong>loh.tar, KTextEditor, cullmann, mwolff<br /><strong>Cc: </strong>mwolff, cullmann, sars, kwrite-devel, kde-frameworks-devel, KTextEditor, hase, michaelh, ngraham, bruns, demsking, dhaumann<br /></div>