Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

bugfix

  • Loading branch information...
commit 6098abd1cd571445aaa4c036a2f6b26a15686587 1 parent aacfb63
@johnny authored
View
6 TODO
@@ -9,9 +9,9 @@
- [-] publish project
- [ ] documentation
- [X] better static files handling:
- - [ ] package files
- - [ ] join and compress js files
- - [ ] push to github
+ - [X] package files
+ - [X] join and compress js files
+ - [X] push to github
- [ ] update preview periodically (and track changes)
- [ ] clean pasted text
- [ ] Better Dialogs (for inspiration see gollum)
View
11 public/javascripts/modes/textile/textileMode.js
@@ -48,7 +48,8 @@ ME.addMode("textile", function() {
}
regexpes = {
- "*": /^(\w+\. )?\s*\*(.*)\*/
+ "*": [/^(\w+\. )?\s*\*/, /\*([\.]*)$/],
+ "_": [/^(\w+\. )?\s*_/, /_([\.]*)$/]
};
return {
name: "Textile Mode",
@@ -67,20 +68,20 @@ ME.addMode("textile", function() {
if(/ on$/.test(target.className)){
// first handle the left part
- match = currentLine.match(/^(\w+\. )?\s*\*/);
+ match = currentLine.match(regexpes[this.delimiter][0]);
if(match){
currentLine = (match[1] || "") + currentLine.slice(match[0].length);
} else {
// place delimiter left and extend selection
- currentLine = "*" + toolbar.extendLeftSelection(/[ .]+/) + currentLine;
+ currentLine = this.delimiter + toolbar.extendLeftSelection(/[ .]+/) + currentLine;
}
// Then handle the right
- match = currentLine.match(/\*([\.]*)$/);
+ match = currentLine.match(regexpes[this.delimiter][1]);
if(match){
currentLine = currentLine.slice(0, - match[0].length) + (match[1] || "");
} else {
- currentLine += toolbar.extendRightSelection(/ +/) + "*";
+ currentLine += toolbar.extendRightSelection(/ +/) + this.delimiter;
}
} else {
View
16 views/textareas/textile.erb
@@ -1,18 +1,8 @@
h1. Test
-This is _a_ _Test_ of the *textile* capabilities of ME.
+This is _a Test_ of the *textile* capabilities of ME.
It should be "quite":http://example.com capable of handling many "major":http://example.com features.
-Test
-test
-test test test
-asdf asdf sadf
-asdfasdf saf saf saf asf asf
-asdf asdf
-bla
+h2. Subheading
-h2. Test 2
-
-hallo
-bla
-soso
+lorem
Please sign in to comment.
Something went wrong with that request. Please try again.