https://github.com/kylef/pygments-apiblueprint
An API Blueprint Lexer for Pygments
https://github.com/kylef/pygments-apiblueprint
api-blueprint
Last synced: about 1 year ago
JSON representation
An API Blueprint Lexer for Pygments
- Host: GitHub
- URL: https://github.com/kylef/pygments-apiblueprint
- Owner: kylef
- License: bsd-3-clause
- Created: 2017-05-09T19:01:56.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-09T22:22:15.000Z (about 6 years ago)
- Last Synced: 2025-04-12T03:06:20.620Z (about 1 year ago)
- Topics: api-blueprint
- Language: Python
- Homepage:
- Size: 97.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Pygments API Blueprint
## Installation
```shell
$ pip install pygments-apiblueprint
```
## Usage
Once installed, the Pygments API Blueprint lexer is instantly available to
Pygments.
```python
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
