Skip to content

Commit

Permalink
Update joined files
Browse files Browse the repository at this point in the history
  • Loading branch information
johnny committed Jun 4, 2011
1 parent 6098abd commit e21b19a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
18 changes: 9 additions & 9 deletions public/javascripts/joined-min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions public/javascripts/joined.js
Expand Up @@ -567,7 +567,8 @@ ME.addMode("textile", function() {
} }


regexpes = { regexpes = {
"*": /^(\w+\. )?\s*\*(.*)\*/ "*": [/^(\w+\. )?\s*\*/, /\*([\.]*)$/],
"_": [/^(\w+\. )?\s*_/, /_([\.]*)$/]
}; };
return { return {
name: "Textile Mode", name: "Textile Mode",
Expand All @@ -586,20 +587,20 @@ ME.addMode("textile", function() {
if(/ on$/.test(target.className)){ if(/ on$/.test(target.className)){


// first handle the left part // first handle the left part
match = currentLine.match(/^(\w+\. )?\s*\*/); match = currentLine.match(regexpes[this.delimiter][0]);
if(match){ if(match){
currentLine = (match[1] || "") + currentLine.slice(match[0].length); currentLine = (match[1] || "") + currentLine.slice(match[0].length);
} else { } else {
// place delimiter left and extend selection // place delimiter left and extend selection
currentLine = "*" + toolbar.extendLeftSelection(/[ .]+/) + currentLine; currentLine = this.delimiter + toolbar.extendLeftSelection(/[ .]+/) + currentLine;
} }


// Then handle the right // Then handle the right
match = currentLine.match(/\*([\.]*)$/); match = currentLine.match(regexpes[this.delimiter][1]);
if(match){ if(match){
currentLine = currentLine.slice(0, - match[0].length) + (match[1] || ""); currentLine = currentLine.slice(0, - match[0].length) + (match[1] || "");
} else { } else {
currentLine += toolbar.extendRightSelection(/ +/) + "*"; currentLine += toolbar.extendRightSelection(/ +/) + this.delimiter;
} }


} else { } else {
Expand Down

0 comments on commit e21b19a

Please sign in to comment.