mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-17 11:30:02 +00:00
changed to conform to Jeremy's standards - sorry…
This commit is contained in:
parent
eb7b82696b
commit
ce8cc7607f
@ -52,11 +52,7 @@ var processRow = function(prevColumns) {
|
|||||||
// Move to just before the `|` terminating the cell
|
// Move to just before the `|` terminating the cell
|
||||||
this.parser.pos = cellRegExp.lastIndex - 1;
|
this.parser.pos = cellRegExp.lastIndex - 1;
|
||||||
} else if(cellMatch[1] === "<" && prevCell) {
|
} else if(cellMatch[1] === "<" && prevCell) {
|
||||||
try {
|
colSpanCount = 1+$tw.utils.getAttributeValueFromParseTreeNode(prevCell, "colspan", 1);
|
||||||
colSpanCount = 1+prevCell.attributes.colspan.value;
|
|
||||||
} catch (e) {
|
|
||||||
colSpanCount = 2;
|
|
||||||
}
|
|
||||||
$tw.utils.addAttributeToParseTreeNode(prevCell,"colspan",colSpanCount);
|
$tw.utils.addAttributeToParseTreeNode(prevCell,"colspan",colSpanCount);
|
||||||
colSpanCount = 1;
|
colSpanCount = 1;
|
||||||
// Move to just before the `|` terminating the cell
|
// Move to just before the `|` terminating the cell
|
||||||
|
@ -19,6 +19,13 @@ exports.addAttributeToParseTreeNode = function(node,name,value) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.getAttributeValueFromParseTreeNode = function(node,name,defaultValue) {
|
||||||
|
if(node.type === "element" && node.attributes && node.attributes[name] && node.attributes[name].value != undefined) {
|
||||||
|
return node.attributes[name].value;
|
||||||
|
}
|
||||||
|
return defaultValue;
|
||||||
|
};
|
||||||
|
|
||||||
exports.addClassToParseTreeNode = function(node,classString) {
|
exports.addClassToParseTreeNode = function(node,classString) {
|
||||||
var classes = [];
|
var classes = [];
|
||||||
if(node.type === "element") {
|
if(node.type === "element") {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user