202202# '&struct_name.member' - name of a structure member
203203# '@parameter' - name of a parameter
204204# '%CONST' - name of a constant.
205+ # '``LITERAL``' - literal string without any spaces on it.
205206
206207# # init lots of data
207208
@@ -210,7 +211,8 @@ my $warnings = 0;
210211my $anon_struct_union = 0;
211212
212213# match expressions used to find embedded type information
213- my $type_constant = ' \%([-_\w]+)' ;
214+ my $type_constant = ' \b``([^\`]+)``\b' ;
215+ my $type_constant2 = ' \%([-_\w]+)' ;
214216my $type_func = ' (\w+)\(\)' ;
215217my $type_param = ' \@(\w+(\.\.\.)?)' ;
216218my $type_fp_param = ' \@(\w+)\(\)' ; # Special RST handling for func ptr params
@@ -235,6 +237,7 @@ my $type_member_func = $type_member . '\(\)';
235237# these work fairly well
236238my @highlights_html = (
237239 [$type_constant , " <i>\$ 1</i>" ],
240+ [$type_constant2 , " <i>\$ 1</i>" ],
238241 [$type_func , " <b>\$ 1</b>" ],
239242 [$type_enum_xml , " <i>\$ 1</i>" ],
240243 [$type_struct_xml , " <i>\$ 1</i>" ],
@@ -252,6 +255,7 @@ my $blankline_html = $local_lt . "p" . $local_gt; # was "<p>"
252255# html version 5
253256my @highlights_html5 = (
254257 [$type_constant , " <span class=\" const\" >\$ 1</span>" ],
258+ [$type_constant2 , " <span class=\" const\" >\$ 1</span>" ],
255259 [$type_func , " <span class=\" func\" >\$ 1</span>" ],
256260 [$type_enum_xml , " <span class=\" enum\" >\$ 1</span>" ],
257261 [$type_struct_xml , " <span class=\" struct\" >\$ 1</span>" ],
@@ -268,6 +272,7 @@ my $blankline_html5 = $local_lt . "br /" . $local_gt;
268272my @highlights_xml = (
269273 [" ([^=])\\\" ([^\\\" <]+)\\\" " , " \$ 1<quote>\$ 2</quote>" ],
270274 [$type_constant , " <constant>\$ 1</constant>" ],
275+ [$type_constant2 , " <constant>\$ 1</constant>" ],
271276 [$type_enum_xml , " <type>\$ 1</type>" ],
272277 [$type_struct_xml , " <structname>\$ 1</structname>" ],
273278 [$type_typedef_xml , " <type>\$ 1</type>" ],
@@ -283,6 +288,7 @@ my $blankline_xml = $local_lt . "/para" . $local_gt . $local_lt . "para" . $loca
283288# gnome, docbook format
284289my @highlights_gnome = (
285290 [$type_constant , " <replaceable class=\" option\" >\$ 1</replaceable>" ],
291+ [$type_constant2 , " <replaceable class=\" option\" >\$ 1</replaceable>" ],
286292 [$type_func , " <function>\$ 1</function>" ],
287293 [$type_enum , " <type>\$ 1</type>" ],
288294 [$type_struct , " <structname>\$ 1</structname>" ],
@@ -298,6 +304,7 @@ my $blankline_gnome = "</para><para>\n";
298304# these are pretty rough
299305my @highlights_man = (
300306 [$type_constant , " \$ 1" ],
307+ [$type_constant2 , " \$ 1" ],
301308 [$type_func , " \\\\ fB\$ 1\\\\ fP" ],
302309 [$type_enum , " \\\\ fI\$ 1\\\\ fP" ],
303310 [$type_struct , " \\\\ fI\$ 1\\\\ fP" ],
@@ -312,6 +319,7 @@ my $blankline_man = "";
312319# text-mode
313320my @highlights_text = (
314321 [$type_constant , " \$ 1" ],
322+ [$type_constant2 , " \$ 1" ],
315323 [$type_func , " \$ 1" ],
316324 [$type_enum , " \$ 1" ],
317325 [$type_struct , " \$ 1" ],
@@ -326,6 +334,7 @@ my $blankline_text = "";
326334# rst-mode
327335my @highlights_rst = (
328336 [$type_constant , " ``\$ 1``" ],
337+ [$type_constant2 , " ``\$ 1``" ],
329338 # Note: need to escape () to avoid func matching later
330339 [$type_member_func , " \\ :c\\ :type\\ :`\$ 1\$ 2\$ 3\\\\ (\\\\ ) <\$ 1>`" ],
331340 [$type_member , " \\ :c\\ :type\\ :`\$ 1\$ 2\$ 3 <\$ 1>`" ],
@@ -344,6 +353,7 @@ my $blankline_rst = "\n";
344353# list mode
345354my @highlights_list = (
346355 [$type_constant , " \$ 1" ],
356+ [$type_constant2 , " \$ 1" ],
347357 [$type_func , " \$ 1" ],
348358 [$type_enum , " \$ 1" ],
349359 [$type_struct , " \$ 1" ],
0 commit comments