diff options
| -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  )  |