Uncomment invalid code to prevent errors for now

This commit is contained in:
Dennis Eichhorn 2018-01-06 13:40:45 +01:00
parent 78f385c8f6
commit 5bab8112bf

View File

@ -873,15 +873,15 @@
let remainder = excerpt['text']; let remainder = excerpt['text'];
let matches = null; let matches = null;
if ((matches = remainder.match(/\[((?:[^][]++|(?R))*+)\]/)) === null) { //if ((matches = remainder.match(/\[((?:[^][]++|(?R))*+)\]/)) === null) {
return; // return;
} //}
element['text'] = matches[1]; element['text'] = matches[1];
extent += matches[0].length; extent += matches[0].length;
remainder = remainder.substr(extent); remainder = remainder.substr(extent);
if ((matches = remainder.match(/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/)) !== null) { /*if ((matches = remainder.match(/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/)) !== null) {
element['attributes']['href'] = matches[1]; element['attributes']['href'] = matches[1];
if (typeof matches[2] !== 'undefined') { if (typeof matches[2] !== 'undefined') {
@ -906,7 +906,7 @@
let def = jsOMS.Utils.Parser.Markdown.definitionData['Reference'][definition]; let def = jsOMS.Utils.Parser.Markdown.definitionData['Reference'][definition];
element['attributes']['href'] = def['url']; element['attributes']['href'] = def['url'];
element['attributes']['title'] = def['title']; element['attributes']['title'] = def['title'];
} }*/
return { return {
extent: extent, extent: extent,
@ -940,9 +940,9 @@
} }
let matches = null; let matches = null;
if (excerpt['text'][1] !== '~' || (matches = excerpt['text'].match(/^~~(?=\S)(.+?)(?<=\S)~~/)) === null) { //if (excerpt['text'][1] !== '~' || (matches = excerpt['text'].match(/^~~(?=\S)(.+?)(?<=\S)~~/)) === null) {
return; // return;
} //}
return { return {
extent: matches[0].length, extent: matches[0].length,
@ -1073,11 +1073,11 @@
if (typeof element['attributes'] !== 'undefined' && element['attributes'] !== null && element['attributes'] !== '') { if (typeof element['attributes'] !== 'undefined' && element['attributes'] !== null && element['attributes'] !== '') {
for (let att in element['attributs']) { for (let att in element['attributs']) {
if (att.match(/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/) === null) { //if (att.match(/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/) === null) {
delete element['attributes'][att] // delete element['attributes'][att]
} else if (jsOMS.Utils.Parser.Markdown.striAtStart(att, 'on')) { //} else if (jsOMS.Utils.Parser.Markdown.striAtStart(att, 'on')) {
delete element['attributes'][att]; // delete element['attributes'][att];
} //}
} }
} }