mirror of https://github.com/status-im/codimd.git
Added back missing list item custom parsing
This commit is contained in:
parent
fa957db272
commit
4e358cd6f4
|
@ -429,8 +429,8 @@ var md = new Remarkable('full', {
|
|||
typographer: true,
|
||||
highlight: highlightRender
|
||||
});
|
||||
md.renderer.rules.list_item_open = function (/* tokens, idx, options, env */) {
|
||||
return '<li class="raw">';
|
||||
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 */ ) {
|
||||
return '<blockquote class="raw">\n';
|
||||
|
|
|
@ -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 New Issue