[utilities/kate] doc/katepart: Highlight documentation: new attributes for some rules: weakDeliminator and additionalDeliminator

Jonathan Poelen null at kde.org
Sun Dec 27 11:47:37 GMT 2020


Git commit 8903a672201500ac90ac73fe08604d2d77a284f8 by Jonathan Poelen.
Committed on 27/12/2020 at 06:45.
Pushed by cullmann into branch 'master'.

Highlight documentation: new attributes for some rules: weakDeliminator and additionalDeliminator

M  +29   -7    doc/katepart/development.docbook

https://invent.kde.org/utilities/kate/commit/8903a672201500ac90ac73fe08604d2d77a284f8

diff --git a/doc/katepart/development.docbook b/doc/katepart/development.docbook
index 6123dff22..8b4b89742 100644
--- a/doc/katepart/development.docbook
+++ b/doc/katepart/development.docbook
@@ -830,6 +830,25 @@ This matches text as: <userinput>#label""""inside the context""""#</userinput>.<
 </context>
 </programlisting>
 
+<itemizedlist>
+<title>Local deliminators</title>
+<para>Some rules allow the optional attributes <userinput>weakDeliminator</userinput>
+and <userinput>additionalDeliminator</userinput> which are combined with attributes
+of the same name of <userinput>keywords</userinput> tag. For example, when
+<userinput>'%'</userinput> is a weak delimiter of <userinput>keywords</userinput>,
+it can become a word delimiter only for a rule by putting it in its
+<userinput>additionalDeliminator</userinput> attribute. Whenever a rule allows these
+attributes it will contain a <emphasis>(local deliminators)</emphasis>.</para>
+
+<listitem>
+<para><emphasis>weakDeliminator</emphasis>: list of characters that do not act as word
+delimiters.</para>
+</listitem>
+<listitem>
+<para><emphasis>additionalDeliminator</emphasis>: defines additional delimiters.</para>
+</listitem>
+</itemizedlist>
+
 <sect3 id="highlighting-rules-in-detail">
 <title>The Rules in Detail</title>
 
@@ -885,7 +904,7 @@ comparing is used.</para>
 such as a dot <userinput>'.'</userinput> or a whitespace on the beginning
 and the end of the word. Think of <userinput>\b<string>\b</userinput>
 in terms of a regular expression, but it is faster than the rule <userinput>RegExpr</userinput>.</para>
-<programlisting><WordDetect String="(string)" [insensitive="true|false"] (common attributes) /></programlisting>
+<programlisting><WordDetect String="(string)" [insensitive="true|false"] (common attributes) (local deliminators) /></programlisting>
 <para>The <userinput>String</userinput> attribute defines the string
 to match. The <userinput>insensitive</userinput> attribute defaults to
 <emphasis>false</emphasis> and is passed to the string comparison
@@ -921,7 +940,7 @@ for more information on those.</para>
 <term>keyword</term>
 <listitem>
 <para>Detect a keyword from a specified list.</para>
-<programlisting><keyword String="(list name)" (common attributes) /></programlisting>
+<programlisting><keyword String="(list name)" (common attributes) (local deliminators) /></programlisting>
 <para>The <userinput>String</userinput> attribute identifies the
 keyword list by name. A list with that name must exist.</para>
 <para>The highlighting system processes keyword rules in a very optimized way.
@@ -932,7 +951,10 @@ property of the <emphasis>keywords</emphasis> tag.</para>
 <para>If a keyword to be matched shall contain a delimiter character, this
 respective character must be added to the <emphasis>weakDeliminator</emphasis>
 property of the <emphasis>keywords</emphasis> tag.  This character will then
-loose its delimiter property in all <emphasis>keyword</emphasis> rules.</para>
+loose its delimiter property in all <emphasis>keyword</emphasis> rules. It is
+also possible to use the <emphasis>weakDeliminator</emphasis> attribute of
+<emphasis>keyword</emphasis> so that this modification only applies to this
+rule.</para>
 </listitem>
 </varlistentry>
 
@@ -940,7 +962,7 @@ loose its delimiter property in all <emphasis>keyword</emphasis> rules.</para>
 <term>Int</term>
 <listitem>
 <para>Detect an integer number (as the regular expression: <userinput>\b[0-9]+</userinput>).</para>
-<para><programlisting><Int (common attributes) /></programlisting></para>
+<para><programlisting><Int (common attributes) (local deliminators) /></programlisting></para>
 <para>This rule has no specific attributes.</para>
 </listitem>
 </varlistentry>
@@ -950,7 +972,7 @@ loose its delimiter property in all <emphasis>keyword</emphasis> rules.</para>
 <listitem>
 <para>Detect a floating point number (as the regular expression:
 <userinput>(\b[0-9]+\.[0-9]*|\.[0-9]+)([eE][-+]?[0-9]+)?</userinput>).</para>
-<para><programlisting><Float (common attributes) /></programlisting></para>
+<para><programlisting><Float (common attributes) (local deliminators) /></programlisting></para>
 <para>This rule has no specific attributes.</para>
 </listitem>
 </varlistentry>
@@ -960,7 +982,7 @@ loose its delimiter property in all <emphasis>keyword</emphasis> rules.</para>
 <listitem>
 <para>Detect an octal point number representation (as the regular
 expression: <userinput>\b0[0-7]+</userinput>).</para>
-<para><programlisting><HlCOct (common attributes) /></programlisting></para>
+<para><programlisting><HlCOct (common attributes) (local deliminators) /></programlisting></para>
 <para>This rule has no specific attributes.</para>
 </listitem>
 </varlistentry>
@@ -970,7 +992,7 @@ expression: <userinput>\b0[0-7]+</userinput>).</para>
 <listitem>
 <para>Detect a hexadecimal number representation (as a regular expression:
 <userinput>\b0[xX][0-9a-fA-F]+</userinput>).</para>
-<para><programlisting><HlCHex (common attributes) /></programlisting></para>
+<para><programlisting><HlCHex (common attributes) (local deliminators) /></programlisting></para>
 <para>This rule has no specific attributes.</para>
 </listitem>
 </varlistentry>


More information about the kde-doc-english mailing list