mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-10-31 23:26:18 +00:00
Fix toggling of the numbered list prefix in Markdown tiddlers (#6697)
* Fix toggling of the numbered list prefix in Markdown tiddlers * Define startsWith in utils.js because it's not available in ECMAScript5.1
This commit is contained in:
parent
5ea315fb98
commit
7cbe1e1d83
@ -25,8 +25,8 @@ exports["prefix-lines"] = function(event,operation) {
|
|||||||
$tw.utils.each(lines,function(line,index) {
|
$tw.utils.each(lines,function(line,index) {
|
||||||
// Remove and count any existing prefix characters
|
// Remove and count any existing prefix characters
|
||||||
var count = 0;
|
var count = 0;
|
||||||
while(line.charAt(0) === event.paramObject.character) {
|
while($tw.utils.startsWith(line,event.paramObject.character)) {
|
||||||
line = line.substring(1);
|
line = line.substring(event.paramObject.character.length);
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
// Remove any whitespace
|
// Remove any whitespace
|
||||||
|
Loading…
Reference in New Issue
Block a user