1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-19 08:14:50 +00:00

Merge pull request #258 from Skeeve/quotelist

inserted > into lists
This commit is contained in:
Jeremy Ruston 2013-12-05 07:16:05 -08:00
commit 4d4a0e01b4

View File

@ -52,7 +52,7 @@ exports.types = {block: true};
exports.init = function(parser) { exports.init = function(parser) {
this.parser = parser; this.parser = parser;
// Regexp to match // Regexp to match
this.matchRegExp = /([\*#;:]+)/mg; this.matchRegExp = /([\*#;:>]+)/mg;
}; };
var listTypes = { var listTypes = {
@ -60,6 +60,7 @@ var listTypes = {
"#": {listTag: "ol", itemTag: "li"}, "#": {listTag: "ol", itemTag: "li"},
";": {listTag: "dl", itemTag: "dt"}, ";": {listTag: "dl", itemTag: "dt"},
":": {listTag: "dl", itemTag: "dd"} ":": {listTag: "dl", itemTag: "dd"}
">": {listTag: "blockquote", itemTag: "p"}
}; };
/* /*
@ -71,7 +72,7 @@ exports.parse = function() {
// Cycle through the items in the list // Cycle through the items in the list
while(true) { while(true) {
// Match the list marker // Match the list marker
var reMatch = /([\*#;:]+)/mg; var reMatch = /([\*#;:>]+)/mg;
reMatch.lastIndex = this.parser.pos; reMatch.lastIndex = this.parser.pos;
var match = reMatch.exec(this.parser.source); var match = reMatch.exec(this.parser.source);
if(!match || match.index !== this.parser.pos) { if(!match || match.index !== this.parser.pos) {