mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 10:07:19 +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) {
|
||||
// Remove and count any existing prefix characters
|
||||
var count = 0;
|
||||
while(line.charAt(0) === event.paramObject.character) {
|
||||
line = line.substring(1);
|
||||
while($tw.utils.startsWith(line,event.paramObject.character)) {
|
||||
line = line.substring(event.paramObject.character.length);
|
||||
count++;
|
||||
}
|
||||
// Remove any whitespace
|
||||
|
Loading…
Reference in New Issue
Block a user