Updated readme to talk about attributes on fenced code blocks.
This commit is contained in:
parent
139dee0ade
commit
f2abf82157
1 changed files with 34 additions and 2 deletions
|
|
@ -214,13 +214,45 @@ Version History
|
|||
|
||||
Current Extra:
|
||||
|
||||
* Headers can now have a class attribute. You can add a class using this
|
||||
syntax:
|
||||
* Headers can now have a class attribute. You can add a class inside the
|
||||
extra attribute block which can optionally be put after a header:
|
||||
|
||||
### Header ### {#id .class1 .class2}
|
||||
|
||||
Spaces between components in the brace is optional.
|
||||
|
||||
* Fenced code blocks can also have a class and an id attribute. If you only
|
||||
need to apply a class (typically to indicate the language of a code
|
||||
snippet), you can write it like this:
|
||||
|
||||
~~~ html
|
||||
<b>bold</b>
|
||||
~~~
|
||||
|
||||
or like this:
|
||||
|
||||
~~~ .html
|
||||
<b>bold</b>
|
||||
~~~
|
||||
|
||||
There is a new configuration option `MARKDOWN_CODE_CLASS_PREFIX` you can
|
||||
use if you need to append a prefix to the class name.
|
||||
|
||||
You might also opt to use an extra attribute block just like for headers:
|
||||
|
||||
~~~ {.html #id .codeclass}
|
||||
<b>bold</b>
|
||||
~~~
|
||||
|
||||
Note that class names added this way are not affected by the
|
||||
MARKDOWN_CODE_CLASS_PREFIX.
|
||||
|
||||
A code block creates a `pre` HTML element containing a `code` element.
|
||||
The `code` HTML element is the one that receives the attribute. If for
|
||||
some reason you need attributes to be applied to the enclosing `pre`
|
||||
element instead, you can set the MARKDOWN_ATTR_ON_PRE configuration
|
||||
variable to true.
|
||||
|
||||
* Multiple reference to the same footnote are now allowed.
|
||||
|
||||
* Fixed an issue where no_markup mode was ineffective.
|
||||
|
|
|
|||
Loading…
Reference in a new issue