From e5b45a7c019548106d761dda0dd6c4984a4eb17a Mon Sep 17 00:00:00 2001 From: ema Date: Mon, 23 Jun 2025 01:46:33 +0800 Subject: [PATCH] Support dark mode Python #1675 --- .../Syntax/Dark/Python.xshd | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 QuickLook.Plugin/QuickLook.Plugin.TextViewer/Syntax/Dark/Python.xshd diff --git a/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Syntax/Dark/Python.xshd b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Syntax/Dark/Python.xshd new file mode 100644 index 0000000..0403e3c --- /dev/null +++ b/QuickLook.Plugin/QuickLook.Plugin.TextViewer/Syntax/Dark/Python.xshd @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + TODO + FIXME + + + HACK + UNDONE + + + + + + \# + + + + ''' + ''' + + + """ + """ + + + + " + " + + + + + + ' + ' + + + + + + + and + as + assert + break + class + continue + def + del + elif + else + except + exec + False + finally + for + from + global + if + import + in + is + lambda + None + nonlocal + not + or + pass + print + raise + return + True + try + while + with + yield + async + await + + + + \b + [\d\w_]+ # an identifier + (?=\s*\() # followed by ( + + + \b0[xX][0-9a-fA-F]+ # hex number + ( \b\d+(\.[0-9]+)? #number with optional floating point + | \.[0-9]+ #or just starting with floating point + ) + ([eE][+-]?[0-9]+)? # optional exponent + + + \ No newline at end of file