From ffb66cefd77a4ad2c90e698df440d3f09d08feef Mon Sep 17 00:00:00 2001 From: Francesco Abbate Date: Sat, 23 Oct 2021 15:01:16 +0200 Subject: [PATCH] Fix python docstring highlighting From PR: https://github.com/lite-xl/lite-xl/pull/624 contributed by @dflock. --- data/plugins/language_python.lua | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/data/plugins/language_python.lua b/data/plugins/language_python.lua index e19caa63..60aa41a6 100644 --- a/data/plugins/language_python.lua +++ b/data/plugins/language_python.lua @@ -6,16 +6,16 @@ syntax.add { headers = "^#!.*[ /]python", comment = "#", patterns = { - { pattern = { "#", "\n" }, type = "comment" }, - { pattern = { '[ruU]?"', '"', '\\' }, type = "string" }, - { pattern = { "[ruU]?'", "'", '\\' }, type = "string" }, - { pattern = { '"""', '"""' }, type = "string" }, - { pattern = "0x[%da-fA-F]+", type = "number" }, - { pattern = "-?%d+[%d%.eE]*", type = "number" }, - { pattern = "-?%.?%d+", type = "number" }, - { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, - { pattern = "[%a_][%w_]*%f[(]", type = "function" }, - { pattern = "[%a_][%w_]*", type = "symbol" }, + { pattern = { "#", "\n" }, type = "comment" }, + { pattern = { '[ruU]?"""', '"""'; '\\' }, type = "string" }, + { pattern = { '[ruU]?"', '"', '\\' }, type = "string" }, + { pattern = { "[ruU]?'", "'", '\\' }, type = "string" }, + { pattern = "0x[%da-fA-F]+", type = "number" }, + { pattern = "-?%d+[%d%.eE]*", type = "number" }, + { pattern = "-?%.?%d+", type = "number" }, + { pattern = "[%+%-=/%*%^%%<>!~|&]", type = "operator" }, + { pattern = "[%a_][%w_]*%f[(]", type = "function" }, + { pattern = "[%a_][%w_]*", type = "symbol" }, }, symbols = { ["class"] = "keyword",