Browse Source

demo update

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
013c8ecc7d
  1. 4
      demo/index.html
  2. 36
      dist/remarkable.js
  3. 4
      dist/remarkable.min.js

4
demo/index.html

@ -103,6 +103,10 @@ test.. test... test..... test?..... test!....
Remarkable -- awesome
"Smartypants, double quotes"
'Smartypants, single quotes'
## Emphasis

36
dist/remarkable.js

@ -2542,15 +2542,14 @@ module.exports = {
module.exports = {
singleQuotes: '‘’',
doubleQuotes: '“”', // «» - russian, „“ - deutch
copyright: true,
trademark: true,
registered: true,
plusminus: true,
paragraph: true,
ellipsis: true,
dupes: true,
emDashes: true,
linkify: true
copyright: true, // (c) (C) → ©
trademark: true, // (tm) (TM) → ™
registered: true, // (r) (R) → ®
plusminus: true, // +- → ±
paragraph: true, // (p) (P) → §
ellipsis: true, // ... → …
dupes: true, // ???????? → ???, !!!!! → !!!, `,,` → `,`
emDashes: true // -- → —
};
},{}],10:[function(require,module,exports){
@ -2806,6 +2805,11 @@ function parseLinkLabel(state, start) {
if (state.validateInsideLink) { return -1; }
if (state.label_nest_level) {
state.label_nest_level--;
return -1;
}
state.pos = start + 1;
state.validateInsideLink = true;
level = 1;
@ -2827,7 +2831,12 @@ function parseLinkLabel(state, start) {
if (!ok) { state.pending += state.src[state.pos++]; }
}
if (found) { labelEnd = state.pos; }
if (found) {
labelEnd = state.pos;
state.label_nest_level = 0;
} else {
state.label_nest_level = level - 1;
}
// restore old state
state.pos = oldPos;
@ -5557,6 +5566,9 @@ function links(state) {
// Link reference
//
// do not allow nested reference links
if (state.linkLevel > 0) { return false; }
// [foo] [bar]
// ^^ optional whitespace (can include newlines)
for (; pos < max; pos++) {
@ -5609,7 +5621,9 @@ function links(state) {
title: title,
level: state.level++
});
state.linkLevel++;
state.parser.tokenize(state);
state.linkLevel--;
state.push({ type: 'link_close', level: --state.level });
}
@ -5683,9 +5697,11 @@ function StateInline(src, parser, options, env) {
this.posMax = this.src.length;
this.validateInsideEm = false;
this.validateInsideLink = false;
this.linkLevel = 0;
this.level = 0;
this.link_content = '';
this.pendingLevel = 0;
this.label_nest_level = 0; // for stmd-like backtrack optimization
}

4
dist/remarkable.min.js

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save