mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Revert "add a hack to prevent double newlines when deleting formatting"
This reverts commit ecf9776f90
.
This commit is contained in:
parent
e7ec4edf92
commit
49ea66bca9
1 changed files with 0 additions and 7 deletions
|
@ -95,13 +95,6 @@ function onKeyUp(elem) {
|
||||||
if (!elem.lastChild || elem.lastChild.nodeName.toLowerCase() != "br") {
|
if (!elem.lastChild || elem.lastChild.nodeName.toLowerCase() != "br") {
|
||||||
elem.appendChild(document.createElement("br"));
|
elem.appendChild(document.createElement("br"));
|
||||||
}
|
}
|
||||||
var old = elem.innerHTML;
|
|
||||||
var new_ = old.replace(/<([biu])><br><\\/\\1>/g, "");
|
|
||||||
if (old != new_) {
|
|
||||||
elem.innerHTML = new_;
|
|
||||||
// this may have caused the cursor to disappear
|
|
||||||
caretToEnd();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendState() {
|
function sendState() {
|
||||||
|
|
Loading…
Reference in a new issue