all repos — grayfriday @ c99557ec28d2958929d93f07b077a47de5444be8

blackfriday fork with a few changes

bug in tables when a row has too few columns
Russ Ross russ@russross.com
Mon, 25 Jul 2011 10:23:31 -0600
commit

c99557ec28d2958929d93f07b077a47de5444be8

parent

fbbd3248e98285f5764be3c98be555a1efd3a129

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M block.goblock.go

@@ -770,7 +770,7 @@ if data[i] == '|' {

i++ } - for col = 0; col < len(columns) && data[i] != '\n'; col++ { + for col = 0; col < len(columns) && i < len(data); col++ { for data[i] == ' ' { i++ }

@@ -782,6 +782,8 @@ i++

} cellEnd := i + + // skip the end-of-cell marker, possibly taking us past end of buffer i++ for cellEnd > cellStart && data[cellEnd-1] == ' ' {