 
                         html += "<#{type}>"
 
+                    leftStart = key
                     leftLines = [text]
                     lastType = type
             else
                 leftLines.push row.replace (new RegExp "^\\s{#{secondMinSpace}}"), ''
 
         if leftLines.length > 0
-            html += '<li>' + (@parse (leftLines.join "\n"), yes) + "</li></#{lastType}>"
+            html += '<li>' + (@parse (leftLines.join "\n"), yes, start + leftStart) + "</li></#{lastType}>"
 
         html
 
 
-    parseTable: (lines, value) ->
+    parseTable: (lines, value, start) ->
         [ignores, aligns] = value
         head = ignores.length > 0 and (ignores.reduce (prev, curr) -> curr + prev) > 0
 


        lastType = ''
        leftLines = []

        for row in rows
            if row instanceof Array
                [space, type, line, text] = row


                lang = trim lang
                rel = trim rel
        
        isEmpty = yes

        lines = lines.slice 1, -1
            .map (line) ->
                line = line.replace (new RegExp "/^[ ]{#{count}}/"), ''
                if isEmpty and !line.match /^\s*$/
                    isEmpty = no

                htmlspecialchars line

        str = (@markLines lines, start + 1).join "\n"

        if isEmpty then '' else '<pre><code' \
            + (if !!lang then " class=\"#{lang}\"" else '') \
            + (if !!rel then " rel=\"#{rel}\"" else '') + '>' \
            + str + '</code></pre>'

    
    parsePre: (lines, value, start) ->
        lines = lines.map (line) ->
            htmlspecialchars line.substring 4
        str = (@markLines lines, start).join "\n"

        if str.match /^\s*$/ then '' else '<pre><code>' + str + '</code></pre>'


    parseAhtml: (lines, value, start) ->
        trim (@markLines lines, start).join "\n"


    parseShtml: (lines, value, start) ->
        trim (@markLines (lines.slice 1, -1), start + 1).join "\n"


    parseMath: (lines, value, start, end) ->
        '<p>' + (@markLine start, end) + (htmlspecialchars lines.join "\n") + '</p>'


    parseSh: (lines, num, start, end) ->
        line = (@markLine start, end) + @parseInline trim lines[0], '# '
        if line.match /^\s*$/ then '' else "<h#{num}>#{line}</h#{num}>"


    parseMh: (lines, num, start, end) ->
        @parseSh lines, num, start, end


    parseQuote: (lines, value, start) ->
        lines = lines.map (line) ->
            line.replace /^\s*> ?/, ''
        str = lines.join "\n"

        if str.match /^\s*$/ then '' else '<blockquote>' + (@parse str, yes, start) + '</blockquote>'


    parseList: (lines, value, start) ->
        html = ''
        minSpace = 99999
        secondMinSpace = 99999
