summaryrefslogtreecommitdiffstats
path: root/doc/classes/SyntaxHighlighter.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/SyntaxHighlighter.xml')
-rw-r--r--doc/classes/SyntaxHighlighter.xml9
1 files changed, 4 insertions, 5 deletions
diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml
index 27cee26c50..22d20d24e5 100644
--- a/doc/classes/SyntaxHighlighter.xml
+++ b/doc/classes/SyntaxHighlighter.xml
@@ -41,11 +41,11 @@
<return type="Dictionary" />
<param index="0" name="line" type="int" />
<description>
- Returns syntax highlighting data for a single line. If the line is not cached, calls [method _get_line_syntax_highlighting] to calculate the data.
- The return [Dictionary] is column number to [Dictionary]. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region, currently only the key "color" is supported.
- [b]Example return:[/b]
+ Returns the syntax highlighting data for the line at index [param line]. If the line is not cached, calls [method _get_line_syntax_highlighting] first to calculate the data.
+ Each entry is a column number containing a nested [Dictionary]. The column number denotes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region. Currently only the key [code]"color"[/code] is supported.
+ [b]Example:[/b] Possible return value. This means columns [code]0[/code] to [code]4[/code] should be red, and columns [code]5[/code] to the end of the line should be green:
[codeblock]
- var color_map = {
+ {
0: {
"color": Color(1, 0, 0)
},
@@ -54,7 +54,6 @@
}
}
[/codeblock]
- This will color columns 0-4 red, and columns 5-eol in green.
</description>
</method>
<method name="get_text_edit" qualifiers="const">