<commit_before><commit_msg>Dummy math extension for when you don't want to enable pngmath or jsmath but want math in the PDF version (weird corner case anyway)<commit_after># -*- coding: utf-8 -*-
"""
    This is a dummy math extension.
    
    It's a hack, but if you want math in a PDF via pdfbuilder, and don't want to
    enable pngmath or jsmath, then enable this one.
    
    :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

import re
import shutil
import tempfile
import posixpath
from os import path, getcwd, chdir
from subprocess import Popen, PIPE
try:
    from hashlib import sha1 as sha
except ImportError:
    from sha import sha

from docutils import nodes

from sphinx.errors import SphinxError
from sphinx.util import ensuredir
from sphinx.util.png import read_png_depth, write_png_depth
from sphinx.ext.mathbase import setup as mathbase_setup, wrap_displaymath

class MathExtError(SphinxError):
    category = 'Math extension error'


def html_visit_math(self, node):
    raise nodes.SkipNode

def html_visit_displaymath(self, node):
    raise nodes.SkipNode


def setup(app):
    mathbase_setup(app, (html_visit_math, None), (html_visit_displaymath, None))

{'fraction_non_alphanumeric': 0.06602254428341385, 'fraction_numerical': 0.008051529790660225, 'mean_word_length': 4.222689075630252, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5787744', 'n_tokens_mistral': 390, 'n_tokens_neox': 369, 'n_words': 151}