diff options
author | 2021-04-10 10:56:39 +0530 | |
---|---|---|
committer | 2021-04-10 10:56:39 +0530 | |
commit | 4bdc3a934c5c9564829466a175f3a8c4545448ba (patch) | |
tree | faad4f7978cce8bdef370ac96d770ab691876da9 | |
parent | exclude non error-causing lines from try-except (diff) |
change background color to match discord theme exactly
-rw-r--r-- | bot/exts/evergreen/latex.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bot/exts/evergreen/latex.py b/bot/exts/evergreen/latex.py index 7cc3432f..d140e79d 100644 --- a/bot/exts/evergreen/latex.py +++ b/bot/exts/evergreen/latex.py @@ -13,19 +13,19 @@ plt.rcParams.update( "font.size": 16, "mathtext.fontset": "cm", # Computer Modern font set "mathtext.rm": "serif", - "figure.facecolor": "38383F", # matches Discord's dark mode background color + "figure.facecolor": "36393F", # matches Discord's dark mode background color "text.color": "white", } ) FORMATTED_CODE_REGEX = re.compile( - r"(?P<delim>(?P<block>```)|``?)" # code delimiter: 1-3 backticks; (?P=block) only matches if it's a block - r"(?(block)(?:(?P<lang>[a-z]+)\n)?)" # if we're in a block, match optional language (only letters plus newline) - r"(?:[ \t]*\n)*" # any blank (empty or tabs/spaces only) lines before the code - r"(?P<code>.*?)" # extract all code inside the markup - r"\s*" # any more whitespace before the end of the code markup - r"(?P=delim)", # match the exact same delimiter from the start again - re.DOTALL | re.IGNORECASE, # "." also matches newlines, case insensitive + r"(?P<delim>(?P<block>```)|``?)" # code delimiter: 1-3 backticks; (?P=block) only matches if it's a block + r"(?(block)(?:(?P<lang>[a-z]+)\n)?)" # if we're in a block, match optional language (only letters plus newline) + r"(?:[ \t]*\n)*" # any blank (empty or tabs/spaces only) lines before the code + r"(?P<code>.*?)" # extract all code inside the markup + r"\s*" # any more whitespace before the end of the code markup + r"(?P=delim)", # match the exact same delimiter from the start again + re.DOTALL | re.IGNORECASE, # "." also matches newlines, case insensitive ) |