fixed: insert next list item correctly when hitting enter
This commit is contained in:
parent
73216ae5ae
commit
496aeb11b7
3
main.js
3
main.js
|
@ -2146,7 +2146,7 @@ function editorkeydown()
|
||||||
{
|
{
|
||||||
var line = md.value.substring(0, getpos()).split("\n").pop();
|
var line = md.value.substring(0, getpos()).split("\n").pop();
|
||||||
markerslist.filter(marker => line.startsWith(marker))
|
markerslist.filter(marker => line.startsWith(marker))
|
||||||
.forEach(marker =>
|
.every(marker =>
|
||||||
{
|
{
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (line != marker)
|
if (line != marker)
|
||||||
|
@ -2157,6 +2157,7 @@ function editorkeydown()
|
||||||
{
|
{
|
||||||
backspace(marker.length);
|
backspace(marker.length);
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else if (event.key === "Tab")
|
else if (event.key === "Tab")
|
||||||
|
|
Loading…
Reference in New Issue