You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 848c502
Browse filesBrowse the repository at this point in the historyBrowse files
`language_prefix` | string | `#!py3 'language-'` | Controls the prefix applied to the language class when Pygments is not used. By default, uses the HTML5 prefix of `language-`.
150
150
`code_attr_on_pre` | bool | `#!py3 False` | By default, the language class and all attributes added via the [`attr_list`][attr-list] extension are attached to the `#!html <code>` element. This forces them to be attached to the `#!html <pre>` element.
151
151
`auto_title` | bool | `#!py3 False` | When using Pygments, for all code blocks generate a title header with the name of the lexer being used. The lexer name is pulled directly from Pygments and title cased appropriately.
152
-
`auto_title_map` | dict | `#!py3 {}` | A dictionary used to override certain titles returned by `auto_title`. Simply specify the title to override as the key and the desired title as the value.
152
+
`auto_title_map` | dict | `#!py3 {}` | A dictionary used to override certain titles returned by `auto_title`. Simply specify the title to override as the key and the desired title as the value. If you desire the title to be treated as HTML, specify the title as a dictionary `#!py {"title": "My Title", "mode": "html"}`.
153
153
`line_spans` | string | `#!py3 ''` | Controls the Pygments option of a similar name. If set to a nonempty string, e.g. `foo`, the formatter will wrap each output line in a `#!html <span>` tag with an id of `foo-<code_block_number>-<line_number>`.
154
154
`anchor_linenums` | bool | `#!py3 False` | Enables the Pygments option of a similar name. If set to `#!py True`, will wrap line numbers in `#!html <a>` tags. Used in combination with `linenums` and `line_anchors`. If `line_anchors` is not configured, `__codelineno` will be assumed as the ID prefix.
155
155
`line_anchors` | bool | `#!py3 False` | Controls the Pygments option of a similar name. If set to a nonempty string, e.g. `foo`, the formatter will insert an anchor tag with an id (and name) of `foo-<code_block_number>-<line_number>`.
156
156
`pygments_lang_class` | bool | `#!py3 False` | If set to True, the language name used will be included as a class attached to the element with the associated `language_prefix`.
157
157
`stripnl` | bool | `#!py3 True` | Strips leading and trailing newlines from code blocks. This is Pygments default behavior. Setting this to `#!py False` disables this and will retain leading and trailing newlines. This has no affect on inline code.
158
158
159
-
/// new | New 7.1
160
-
`linenums_class` was added in `7.1`.
161
-
///
159
+
> [!new] New 7.1
160
+
> `linenums_class` was added in `7.1`.
162
161
163
-
/// new | New 7.2
164
-
`linenums` now accepts `#!py3 None` as the default for allow line numbers to be enabled per code block.
165
-
`#!py3 False` now disables line numbers globally preventing line numbers even if specified per code block. `True`
166
-
still enables globally.
167
-
///
162
+
> [!new] New 7.2
163
+
> `linenums` now accepts `#!py3 None` as the default for allow line numbers to be enabled per code block.
164
+
> `#!py3 False` now disables line numbers globally preventing line numbers even if specified per code block. `True`
165
+
> still enables globally.
168
166
169
-
/// new | New 9.0
170
-
`auto_title`, `auto_title_map`, `line_spans`, `anchor_linenums`, and `line_anchors` were all added in `9.0`.
171
-
///
167
+
> [!new] New 9.0
168
+
> `auto_title`, `auto_title_map`, `line_spans`, `anchor_linenums`, and `line_anchors` were all added in `9.0`.
172
169
173
-
/// new | New 10.7
174
-
`default_lang` added in 10.7.
175
-
///
170
+
> [!new] New 10.7
171
+
> `default_lang` added in 10.7.
172
+
173
+
> [!new] New 12.2
174
+
> Added the ability to specify the title mode as `html` in the `auto_title_map`.
0 commit comments