![]() ![]() This really only has an effect when used with noclasses. True for always, False for never, 'block' for block code only, and 'inline' for inline code only. Guess what syntax language should be used if no language is specified. Optionĭefault class to apply to the wrapper element on code blocks. Many of these options are demonstrated in the SuperFences documentation. The three exceptions are use_pygments which disables Pygments, css_class which sets the name of the class assigned to the generated code blocks, and code_attr_on_pre which only apply when Pygments is disabled. OptionsĪll options below control the Pygments' output. Line number styles are set with the option linenums_style as described in Options. Each dictionary contains three keys: name which is the new name you are adding, lang which is the language the new name maps to, and options which is a dictionary of the options you wish to apply. You can also use extend_pygments_lang to completely override the base language's options – assuming your specified name overrides an existing name.Įxtend_pygments_langis an array of dictionaries. This would allow you to use php for normal PHP blocks, but also allow you to do use php-inline for code without specifying . So if you wanted to enable startinline for php, you might create a language alias called php-inline that maps to php with startinline enabled. ![]() Highlight allows you to configure these settings via the option extend_pygments_lang.Įxtend_pygments_lang allows you to create a special Pygments alias language where you can configure the language settings to your liking. For instance, the php lexer has the option startinline which, if enabled, will parse PHP syntax without requiring at the beginning. If using Pygments, some lexers have special settings. The code_attr_on_pre option will force them to be attached to the element.Īll other options specifically control the Pygments highlighter and will have no affect if Pygments usage is disabled. The language class, and any attributes added via the attr_list extension, are added to the element. This prefix can be changed via the language_prefix option. This class name can be changed with the css_class option.īy default, the prefix language- is applied to language classes when Pygments is disabled or when Pygments code blocks enable language classes via pygments_lang_class. Highlight is the default class name, and will be applied to code blocks, whether Pygments is disabled or not.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |