Skip to content

Commit

Permalink
rename singularity pygments to apptainer
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Dykstra <[email protected]>
  • Loading branch information
DrDaveD committed Feb 16, 2022
1 parent a71c1d1 commit 919fb81
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@

sys.path.append(os.path.join(os.path.dirname(__file__), '.'))
from sphinx.highlighting import lexers
from pygments_singularity import SingularityLexer
from pygments_apptainer import ApptainerLexer
from pygments_json import JSONLexer
from replacements import *
# lexer for Singularity definition files (added here until it is upstreamed into Pygments).
lexers['singularity'] = SingularityLexer(startinline=True)
# lexer for Apptainer definition files (added here until it is upstreamed into Pygments).
lexers['apptainer'] = ApptainerLexer(startinline=True)
lexers['json'] = JSONLexer(startinline=True)
10 changes: 5 additions & 5 deletions pygments_singularity.py → pygments_apptainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
from pygments.lexers.shell import BashLexer
import re

class SingularityLexer(RegexLexer):
class ApptainerLexer(RegexLexer):
"""
Lexer for `Singularity definition files
Lexer for `Apptainer definition files
<https://www.sylabs.io/guides/3.0/user-guide/definition_files.html>`_.
"""

name = 'Singularity'
aliases = ['singularity']
filenames = ['*.def', 'Singularity']
name = 'Apptainer'
aliases = ['apptainer']
filenames = ['*.def', 'Apptainer']
flags = re.IGNORECASE | re.MULTILINE | re.DOTALL

_headers = r'^(\s)*(bootstrap|from|osversion|mirrorurl|include|registry|namespace|includecmd|fingerprints)(:)'
Expand Down

0 comments on commit 919fb81

Please sign in to comment.