<table><tr><td style="">mosra created this revision.<br />mosra added reviewers: cullmann, dhaumann.<br />Herald added projects: Kate, Frameworks.<br />Herald added subscribers: kde-frameworks-devel, kwrite-devel.<br />mosra requested review of this revision.
</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/D23400">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>I'm writing reST quite a lot and finally got to the point where I had to submit a patch :) While doing so, I discovered there was an unmerged <a href="https://phabricator.kde.org/D7245" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D7245</a> which lacked a test file. This one *does* have a test file but compared to the other patch doesn't add the default / Sphinx directives / roles since I don't personally have any use for these. Adding everyone involved with the other patch as a reviewer here, hope that's okay :)</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">Both <tt style="background: #ebebeb; font-size: 13px;">.. code-block::</tt> and <tt style="background: #ebebeb; font-size: 13px;">.. code::</tt> are valid, the former is a Sphinx thing, while <tt style="background: #ebebeb; font-size: 13px;">.. code ::</tt> is a reStructuredText builtin.</li>
<li class="remarkup-list-item">Directives, interpreted text roles and fields can contain <tt style="background: #ebebeb; font-size: 13px;">:</tt> in the name. Used very often by Sphinx and CMake docs. Until now, things like <tt style="background: #ebebeb; font-size: 13px;">.. py:function::</tt> were treated as comments. Colons in field names are *not* handled by this patch, as the handling in the highlighting file is non-trivial, I am completely new to this and thus have a fear of breaking things :)</li>
<li class="remarkup-list-item">A <tt style="background: #ebebeb; font-size: 13px;">..</tt> alone on a line is a comment too, doesn't need to be followed by a space. This also makes it work for multi-line comments where the first line is just a <tt style="background: #ebebeb; font-size: 13px;">..</tt>.</li>
<li class="remarkup-list-item">Highlighting default interpreted text role (single backticks) similarly to named roles.</li>
</ul>
<p>The CMake test was the only place testing for reST highlighting, referencing the umerged <a href="https://phabricator.kde.org/D7245" class="remarkup-link" target="_blank" rel="noreferrer">https://phabricator.kde.org/D7245</a>, updated it accordingly and removed the patch reference since the problems shown there are fixed by this patch.</p>
<p>The test for reST contains some additional things like block quotes, lists, definition lists etc., which are currently not highlighted (but e.g. Markdown highlighter handles them). This test data might be useful for further improvements to the highlighter.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>Look at the HTML output of the test file, plus compare the before/after CMake highlighting.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R216 Syntax Highlighting</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D23400">https://phabricator.kde.org/D23400</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>autotests/folding/highlight.cmake.fold<br />
autotests/folding/highlight.rst.fold<br />
autotests/html/highlight.cmake.html<br />
autotests/html/highlight.rst.html<br />
autotests/input/highlight.cmake<br />
autotests/input/highlight.rst<br />
autotests/reference/highlight.cmake.ref<br />
autotests/reference/highlight.rst.ref<br />
data/syntax/rest.xml</div></div></div><br /><div><strong>To: </strong>mosra, cullmann, dhaumann<br /><strong>Cc: </strong>kwrite-devel, kde-frameworks-devel, turbov, LeGast00n, GB_2, domson, michaelh, ngraham, bruns, demsking, cullmann, sars, dhaumann<br /></div>