Added back missing list item custom parsing
This commit is contained in:
parent
fa957db272
commit
4e358cd6f4
2 changed files with 11 additions and 2 deletions
|
@ -429,7 +429,7 @@ var md = new Remarkable('full', {
|
|||
typographer: true,
|
||||
highlight: highlightRender
|
||||
});
|
||||
md.renderer.rules.list_item_open = function (/* tokens, idx, options, env */) {
|
||||
md.renderer.rules.list_item_open = function ( /* tokens, idx, options, env */ ) {
|
||||
return '<li class="raw">';
|
||||
};
|
||||
md.renderer.rules.blockquote_open = function (tokens, idx /*, options, env */ ) {
|
||||
|
|
|
@ -31,6 +31,15 @@ md.renderer.rules.bullet_list_open = function (tokens, idx /*, options, env */ )
|
|||
return '<ul>\n';
|
||||
};
|
||||
|
||||
md.renderer.rules.list_item_open = function (tokens, idx /*, options, env */ ) {
|
||||
if (tokens[idx].lines) {
|
||||
var startline = tokens[idx].lines[0] + 1;
|
||||
var endline = tokens[idx].lines[1];
|
||||
return '<li class="raw" data-startline="' + startline + '" data-endline="' + endline + '">\n';
|
||||
}
|
||||
return '<li class="raw">';
|
||||
};
|
||||
|
||||
md.renderer.rules.ordered_list_open = function (tokens, idx /*, options, env */ ) {
|
||||
var token = tokens[idx];
|
||||
if (tokens[idx].lines && tokens[idx].level === 0) {
|
||||
|
|
Loading…
Reference in a new issue