Browse Source

Footnotes: updated docs & defaults

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
4bbbffcb77
  1. 20
      README.md
  2. 4
      lib/configs/default.js
  3. 2
      lib/parser_core.js
  4. 0
      lib/rules_core/footnote_tail.js

20
README.md

@ -172,6 +172,7 @@ Disabled by default:
- [\<sup>](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `19^th^` - [\<sup>](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `19^th^`
- [\<sub>](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `H~2~0` - [\<sub>](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `H~2~0`
- [abbreviations](https://michelf.ca/projects/php-markdown/extra/#abbr) - [abbreviations](https://michelf.ca/projects/php-markdown/extra/#abbr)
- [footnotes](http://johnmacfarlane.net/pandoc/README.html#footnotes)
- __\<ins>__ - `++inserted text++` (experimental) - __\<ins>__ - `++inserted text++` (experimental)
- __\<mark>__ - `==marked text==` (experimental) - __\<mark>__ - `==marked text==` (experimental)
@ -193,6 +194,25 @@ md = new Remarkable('full', {
linkify: true, linkify: true,
typographer: true, typographer: true,
}); });
//
// Manually enable rules, disabled by default:
//
var md = new Remarkable();
md.block.ruler.core([
'abbr'
]);
md.block.ruler.enable([
'footnote',
'deflist'
]);
md.block.ruler.enable([
'footnote_inline',
'ins',
'mark',
'sub',
'sup'
]);
``` ```

4
lib/configs/default.js

@ -39,7 +39,8 @@ module.exports = {
'linkify', 'linkify',
'smartquotes', 'smartquotes',
'references', 'references',
'abbr2' 'abbr2',
'footnote_tail'
] ]
}, },
@ -66,6 +67,7 @@ module.exports = {
'emphasis', 'emphasis',
'entity', 'entity',
'escape', 'escape',
'footnote_ref',
'htmltag', 'htmltag',
'links', 'links',
'newline', 'newline',

2
lib/parser_core.js

@ -11,7 +11,7 @@ var _rules = [
[ 'abbr', require('./rules_core/abbr') ], [ 'abbr', require('./rules_core/abbr') ],
[ 'references', require('./rules_core/references') ], [ 'references', require('./rules_core/references') ],
[ 'inline', require('./rules_core/inline') ], [ 'inline', require('./rules_core/inline') ],
[ 'footnote_block', require('./rules_core/footnote_block') ], [ 'footnote_tail', require('./rules_core/footnote_tail') ],
[ 'abbr2', require('./rules_core/abbr2') ], [ 'abbr2', require('./rules_core/abbr2') ],
[ 'replacements', require('./rules_core/replacements') ], [ 'replacements', require('./rules_core/replacements') ],
[ 'smartquotes', require('./rules_core/smartquotes') ], [ 'smartquotes', require('./rules_core/smartquotes') ],

0
lib/rules_core/footnote_block.js → lib/rules_core/footnote_tail.js

Loading…
Cancel
Save