Skip to content
An API Blueprint Lexer for Pygments
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pygments_apiblueprint feat: Support analysing text May 9, 2017
tests
.gitignore Initial project May 9, 2017
.travis.yml
CHANGELOG.md feat: Support analysing text May 9, 2017
LICENSE Initial project May 9, 2017
README.md docs: Add screenshot to README May 9, 2017
pygments_apiblueprint.png
setup.py Initial project May 9, 2017

README.md

Pygments API Blueprint

Installation

$ pip install pygments-apiblueprint

Usage

Once installed, the Pygments API Blueprint lexer is instantly available to Pygments.

from pygments import highlight
from pygments.formatters import HtmlFormatter
from pygments_apiblueprint import APIBlueprintLexer

source = '''
# GET /

+ Response 200 (application/json)
    + Attributes
        + name: `pygments-apiblueprint`
'''

lexer = APIBlueprintLexer()
formatter = HtmlFormatter(linenos='table', cssclass='highlight')
result = highlight(source, lexer, formatter)

print(result)

Example

You can’t perform that action at this time.