Пример #1
0
def setup(sphinx):
    sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
    from solidity_lexer import SolidityLexer
    from pygments.lexer import __all__ as pygments_lexers

    pygments_lexers.append(SolidityLexer)
    sphinx.add_lexer("solidity", SolidityLexer())
Пример #2
0
import sys
import os

# Solidity Lexer
import shlex

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'

# Custom solidity lexer
sys.path.append(os.path.dirname(__file__))
from pygments.lexer import __all__ as pygments_lexers
from solidity_lexer import SolidityLexer


pygments_lexers.append(SolidityLexer)


# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))

# -- General configuration ------------------------------------------------

# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
Пример #3
0
def setup(sphinx):
    sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
    from solidity_lexer import SolidityLexer
    from pygments.lexer import __all__ as pygments_lexers
    pygments_lexers.append(SolidityLexer)
    sphinx.add_lexer('solidity', SolidityLexer())