File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55# https://www.sphinx-doc.org/en/master/usage/configuration.html
66
77# -- General configuration ---------------------------------------------------
8-
8+ import sys
9+ import os
910from multiproject .utils import get_project
1011
12+ sys .path .insert (0 , os .path .abspath ('.' ))
13+
1114# Add any Sphinx extension module names here, as strings. They can be
1215# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
1316# ones.
5659myst_heading_anchors = 4
5760nb_execution_mode = "off"
5861
62+ # -- Custom Lexers -----------------------------------------------------------
63+
64+ from lexers import SciJavaGroovyLexer
65+
66+ def setup (app ):
67+ app .add_lexer ('scijava-groovy' , SciJavaGroovyLexer )
68+
5969# -- Options for HTML output -------------------------------------------------
6070
6171# The theme to use for HTML and HTML Help pages. See the documentation for
Original file line number Diff line number Diff line change 1+ from pygments .lexer import inherit
2+ from pygments .lexers .jvm import GroovyLexer
3+ from pygments .token import Comment
4+
5+ class SciJavaGroovyLexer (GroovyLexer ):
6+ tokens = {
7+ 'base' : [
8+ (r'#@.*?$' , Comment .Single ),
9+ inherit ,
10+ ]
11+ }
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ SciJava Ops via Fiji's sripting engine with `script parameters`_:
99
1010.. tabs ::
1111
12- .. code-tab :: groovy
12+ .. code-tab :: scijava- groovy
1313
1414 #@ ImgPlus img
1515 #@ Double (label="Sigma:", value=5.0) sigma
You can’t perform that action at this time.
0 commit comments