1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +00:00

added fix for issue #94 for horizontal rules, tables and typed block

This commit is contained in:
Stephan Hradek 2013-12-25 23:06:42 +01:00
parent cfad04a5d0
commit f9de55ad5f
3 changed files with 6 additions and 6 deletions

View File

@ -22,7 +22,7 @@ exports.types = {block: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /-{3,}\r?\n/mg;
this.matchRegExp = /-{3,}\r?(?:\n|$)/mg;
};
exports.parse = function() {

View File

@ -18,11 +18,11 @@ exports.types = {block: true};
exports.init = function(parser) {
this.parser = parser;
// Regexp to match
this.matchRegExp = /^\|(?:[^\n]*)\|(?:[fhck]?)\r?\n/mg;
this.matchRegExp = /^\|(?:[^\n]*)\|(?:[fhck]?)\r?(?:\n|$)/mg;
};
var processRow = function(prevColumns) {
var cellRegExp = /(?:\|([^\n\|]*)\|)|(\|[fhck]?\r?\n)/mg,
var cellRegExp = /(?:\|([^\n\|]*)\|)|(\|[fhck]?\r?(?:\n|$))/mg,
cellTermRegExp = /((?:\x20*)\|)/mg,
tree = [],
col = 0,
@ -107,8 +107,8 @@ var processRow = function(prevColumns) {
exports.parse = function() {
var rowContainerTypes = {"c":"caption", "h":"thead", "":"tbody", "f":"tfoot"},
table = {type: "element", tag: "table", children: []},
rowRegExp = /^\|([^\n]*)\|([fhck]?)\r?\n/mg,
rowTermRegExp = /(\|(?:[fhck]?)\r?\n)/mg,
rowRegExp = /^\|([^\n]*)\|([fhck]?)\r?(?:\n|$)/mg,
rowTermRegExp = /(\|(?:[fhck]?)\r?(?:\n|$))/mg,
prevColumns = [],
currRowType,
rowContainer,

View File

@ -40,7 +40,7 @@ exports.init = function(parser) {
};
exports.parse = function() {
var reEnd = /\r?\n\$\$\$\r?\n/mg;
var reEnd = /\r?\n\$\$\$\r?(?:\n|$)/mg;
// Save the type
var parseType = this.match[1],
renderType = this.match[2];