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^`
- [\<sub>](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `H~2~0`
- [abbreviations](https://michelf.ca/projects/php-markdown/extra/#abbr)
- [footnotes](http://johnmacfarlane.net/pandoc/README.html#footnotes)
- __\<ins>__ - `++inserted text++` (experimental)
- __\<mark>__ - `==marked text==` (experimental)
@ -193,6 +194,25 @@ md = new Remarkable('full', {
linkify: 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',
'smartquotes',
'references',
'abbr2'
'abbr2',
'footnote_tail'
]
},
@ -66,6 +67,7 @@ module.exports = {
'emphasis',
'entity',
'escape',
'footnote_ref',
'htmltag',
'links',
'newline',

2
lib/parser_core.js

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

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

Loading…
Cancel
Save