Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
thetarnav committed Mar 13, 2024
1 parent 37f9ec4 commit 7f3950c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions smd.js
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,8 @@ function continue_or_add_list(p, list_token) {
function add_list_item(p, prefix_length) {
add_token(p, LIST_ITEM)
p.spaces[p.len] = p.indent_len + prefix_length
p.pending = ""
p.indent = ""
p.indent_len = 0
p.could_be_task = true
clear_root_pending(p)
}

/**
Expand Down Expand Up @@ -575,8 +573,11 @@ export function parser_write(p, chunk) {
p.pending = pending_with_char
continue
}
/* List Unordered */
case '+':
/*
List Unordered for '+'
The other list types are handled with HORIZONTAL_RULE
*/
case '+':
if (' ' !== char) break // fail

continue_or_add_list(p, LIST_UNORDERED)
Expand All @@ -600,7 +601,7 @@ export function parser_write(p, chunk) {
continue
} else {
const char_code = char.charCodeAt(0)
if (46 === char_code || // '.'
if (46 === char_code || // '.'
is_digit(char_code) // 0-9
) {
p.pending = pending_with_char
Expand Down

0 comments on commit 7f3950c

Please sign in to comment.