Open Rratic opened 1 year ago
Add: in the definition of incorporate_line(parser::Parser, ln::AbstractString)
, in the code elseif parser.pos ≤ length(ln) && !parser.blank
, parser.pos
and length
does not match either.
It isn't satisfying that none of the above solves https://github.com/MichaelHatherly/CommonMark.jl/pull/57
Add: write_markdown(::TableHeader, w, node, enter)
the if
block is empty. Did you forget to write something? This can't make the code look nice.
Thanks for finding those @Rratic, feel free to open PRs if you feel comfortable addressing them, otherwise I'll have a look at them we I next have some free time.
The code
advance_offset(parser, length(parser.buf) - parser.pos + 1, false)
appeared several times. I guess it means to advance to end, butparser.pos
does not seem to be the current char number. And this calculation is not needed, so I guess aadvance_offset_to_end(parser::Parser, columns::Bool) = advance_offset(parser, typemax(Int), columns)
is needed.Also note that you defined many
parser.pos
related functions, but they are not always used.