mirror of
https://github.com/markedjs/marked
synced 2024-11-22 08:12:33 +00:00
remove tables option
This commit is contained in:
parent
d2e85d9b34
commit
44dbeeb31e
@ -25,7 +25,6 @@ marked.setOptions({
|
||||
},
|
||||
pedantic: false,
|
||||
gfm: true,
|
||||
tables: true,
|
||||
breaks: false,
|
||||
sanitize: false,
|
||||
smartLists: true,
|
||||
@ -56,7 +55,6 @@ console.log(marked(markdownString));
|
||||
|silent |`boolean` |`false` |v0.2.7 |If true, the parser does not throw any exception.|
|
||||
|smartLists |`boolean` |`false` |v0.2.8 |If true, use smarter list behavior than those found in `markdown.pl`.|
|
||||
|smartypants |`boolean` |`false` |v0.2.9 |If true, use "smart" typographic punctuation for things like quotes and dashes.|
|
||||
|tables |`boolean` |`true` |v0.2.7 |If true and `gfm` is true, use [GFM Tables extension](https://github.github.com/gfm/#tables-extension-).|
|
||||
|xhtml |`boolean` |`false` |v0.3.2 |If true, emit self-closing HTML tags for void elements (<br/>, <img/>, etc.) with a "/" as required by XHTML.|
|
||||
|
||||
<h2 id="highlight">Asynchronous highlighting</h2>
|
||||
|
@ -101,12 +101,6 @@ block.gfm = merge({}, block.normal, {
|
||||
table: /^ *\|(.+)\n *\|?( *[-:]+[-| :]*)(?:\n((?: *[^>\n ].*(?:\n|$))*)\n*|$)/
|
||||
});
|
||||
|
||||
/**
|
||||
* GFM + Tables Block Grammar
|
||||
*/
|
||||
|
||||
block.tables = merge({}, block.gfm);
|
||||
|
||||
/**
|
||||
* Pedantic grammar (original John Gruber's loose markdown specification)
|
||||
*/
|
||||
@ -149,13 +143,9 @@ function Lexer(options) {
|
||||
if (this.options.pedantic) {
|
||||
this.rules = block.pedantic;
|
||||
} else if (this.options.gfm) {
|
||||
if (this.options.tables) {
|
||||
this.rules = block.tables;
|
||||
} else {
|
||||
this.rules = block.gfm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose Block Rules
|
||||
@ -1670,7 +1660,6 @@ marked.getDefaults = function() {
|
||||
silent: false,
|
||||
smartLists: false,
|
||||
smartypants: false,
|
||||
tables: true,
|
||||
xhtml: false
|
||||
};
|
||||
};
|
||||
|
@ -8,7 +8,7 @@ marked \- a javascript markdown parser
|
||||
.B marked
|
||||
[\-o \fI<output>\fP] [\-i \fI<input>\fP] [\-\-help]
|
||||
[\-\-tokens] [\-\-pedantic] [\-\-gfm]
|
||||
[\-\-breaks] [\-\-tables] [\-\-sanitize]
|
||||
[\-\-breaks] [\-\-sanitize]
|
||||
[\-\-smart\-lists] [\-\-lang\-prefix \fI<prefix>\fP]
|
||||
[\-\-no\-etc...] [\-\-silent] [\fIfilename\fP]
|
||||
|
||||
@ -72,9 +72,6 @@ Enable github flavored markdown.
|
||||
.BI \-\-breaks
|
||||
Enable GFM line breaks. Only works with the gfm option.
|
||||
.TP
|
||||
.BI \-\-tables
|
||||
Enable GFM tables. Only works with the gfm option.
|
||||
.TP
|
||||
.BI \-\-sanitize
|
||||
Sanitize output. Ignore any HTML input.
|
||||
.TP
|
||||
|
@ -4,10 +4,10 @@ NAME
|
||||
marked - a javascript markdown parser
|
||||
|
||||
SYNOPSIS
|
||||
marked [-o <output>] [-i <input>] [--help] [--tokens]
|
||||
[--pedantic] [--gfm] [--breaks] [--tables] [--sanitize]
|
||||
[--smart-lists] [--lang-prefix <prefix>] [--no-etc...] [--silent]
|
||||
[filename]
|
||||
marked [-o <output>] [-i <input>] [--help] [--tokens] [--pedantic]
|
||||
[--gfm] [--breaks] [--sanitize] [--smart-lists] [--lang-prefix <pre-
|
||||
fix>] [--no-etc...] [--silent] [filename]
|
||||
|
||||
|
||||
DESCRIPTION
|
||||
marked is a full-featured javascript markdown parser, built for speed.
|
||||
@ -56,9 +56,6 @@ OPTIONS
|
||||
--breaks
|
||||
Enable GFM line breaks. Only works with the gfm option.
|
||||
|
||||
--tables
|
||||
Enable GFM tables. Only works with the gfm option.
|
||||
|
||||
--sanitize
|
||||
Sanitize output. Ignore any HTML input.
|
||||
|
||||
|
3
test/bench.js
vendored
3
test/bench.js
vendored
@ -29,7 +29,6 @@ function runBench(options) {
|
||||
// Non-GFM, Non-pedantic
|
||||
marked.setOptions({
|
||||
gfm: false,
|
||||
tables: false,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: false,
|
||||
@ -43,7 +42,6 @@ function runBench(options) {
|
||||
// GFM
|
||||
marked.setOptions({
|
||||
gfm: true,
|
||||
tables: false,
|
||||
breaks: false,
|
||||
pedantic: false,
|
||||
sanitize: false,
|
||||
@ -57,7 +55,6 @@ function runBench(options) {
|
||||
// Pedantic
|
||||
marked.setOptions({
|
||||
gfm: false,
|
||||
tables: false,
|
||||
breaks: false,
|
||||
pedantic: true,
|
||||
sanitize: false,
|
||||
|
@ -35,7 +35,7 @@ function runSpecs(title, dir, showCompletionTable, options) {
|
||||
});
|
||||
}
|
||||
|
||||
runSpecs('GFM', './gfm', true, { gfm: true, pedantic: false, tables: true, headerIds: false });
|
||||
runSpecs('GFM', './gfm', true, { gfm: true, pedantic: false, headerIds: false });
|
||||
runSpecs('CommonMark', './commonmark', true, { gfm: false, pedantic: false, headerIds: false });
|
||||
runSpecs('Original', './original', false, { gfm: false, pedantic: true });
|
||||
runSpecs('New', './new');
|
||||
|
Loading…
Reference in New Issue
Block a user