Browse Source

Freeze default rules set (~ equal to GFM). Added `full` preset to enable everything.

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
a4afaa4ccb
  1. 2
      bin/remarkable.js
  2. 8
      lib/configs/default.js
  3. 1
      lib/index.js
  4. 2
      test/remarkable.js

2
bin/remarkable.js

@ -61,7 +61,7 @@ readFile(options.file, 'utf8', function (error, input) {
process.exit(1); process.exit(1);
} }
md = new Remarkable({ md = new Remarkable('full', {
html: true, html: true,
xhtmlOut: true, xhtmlOut: true,
typographer: true, typographer: true,

8
lib/configs/default.js

@ -22,7 +22,7 @@ module.exports = {
components: { components: {
block: { block: {
/*rules: [ rules: [
'blockquote', 'blockquote',
'code', 'code',
'fences', 'fences',
@ -33,11 +33,11 @@ module.exports = {
'list', 'list',
'paragraph', 'paragraph',
'table' 'table'
]*/ ]
}, },
inline: { inline: {
/*rules: [ rules: [
'autolink', 'autolink',
'backticks', 'backticks',
'del', 'del',
@ -49,7 +49,7 @@ module.exports = {
'links', 'links',
'newline', 'newline',
'text' 'text'
]*/ ]
}, },
typographer: { typographer: {

1
lib/index.js

@ -14,6 +14,7 @@ var Linkifier = require('./linkifier');
var config = { var config = {
'default': require('./configs/default'), 'default': require('./configs/default'),
full: require('./configs/full'),
commonmark: require('./configs/commonmark') commonmark: require('./configs/commonmark')
}; };

2
test/remarkable.js

@ -10,7 +10,7 @@ var Remarkable = require('../');
describe('remarkable', function () { describe('remarkable', function () {
var md = new Remarkable({ var md = new Remarkable('full', {
html: true, html: true,
langPrefix: '', langPrefix: '',
typographer: true, typographer: true,

Loading…
Cancel
Save