Fix issue with selection after deselecting italic

pull/1/head 1.1.1
Wes Cossick 9 years ago
parent df988b2f54
commit da30c7f08f

2
simplemde.min.css vendored

File diff suppressed because one or more lines are too long

12
simplemde.min.js vendored

File diff suppressed because one or more lines are too long

@ -0,0 +1,14 @@
# How to compile
Minify the JS in this order:
1. `codemirror/codemirror.js`
1. `codemirror/continuelist.js`
1. `codemirror/markdown.js`
1. `codemirror/xml.js`
1. `marked.js`
1. `markdownify.js`
Minify the CSS in this order:
1. `theme.css`
1. `font-awesome.css`

@ -334,8 +334,13 @@ function _toggleBlock(editor, type, start_chars, end_chars) {
ch: 99999999999999
});
startPoint.ch -= 2;
endPoint.ch -= 2;
if (type == "bold") {
startPoint.ch -= 2;
endPoint.ch -= 2;
} else if (type == "italic") {
startPoint.ch -= 1;
endPoint.ch -= 1;
}
} else {
text = cm.getSelection();
if (type == "bold") {

Loading…
Cancel
Save