a few fixes in markdown list algorithm
a few fixes in markdown list algorithm