Skip to content

zeegin/pygments-bsl

Repository files navigation

PyPI - Version

pygments-bsl

Pygments is a syntax highlighting tool.

Who uses Pygments?

Online example Zensical with pygments-bsl support https://zeegin.github.io/pygments-bsl/

pygments-bsl used in:

Syntax rules adopted from https://github.com/1c-syntax.

Install

$ pip install pygments-bsl

Install local

python -m pip install -e .

Build

python -m pip install --upgrade build
python -m build

Test

python -m pip install --upgrade pytest
pytest

Validate release artifacts

python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python tools/check_dist.py

Docs

python3.12 -m venv .venv-docs
source .venv-docs/bin/activate
pip install --upgrade pip
pip install -e .
pip install "zensical==0.0.24"
zensical serve

Python 3.10+ is required. The command above uses Python 3.12 because that's the tested docs environment. The docs environment is separate from the package's main runtime.

Generate lexer data from JSON (after updating files in 3rd_party/)

python tools/generate_data.py

Usage

pygmentize "C:\git\pygments-bsl\tests\examplefiles\bsl\samples.bsl"
pygmentize "C:\git\pygments-bsl\tests\examplefiles\bsl\samples.os"
pygmentize "C:\git\pygments-bsl\tests\examplefiles\sdbl\samples.sdbl"

About

Pygments 1C (BSL, SDBL) lexer

Resources

License

Stars

Watchers

Forks

Contributors