Repository: JuliaLang/julia
File: stdlib/Markdown/src/Common/block.jl (Julia)

Code before:
        newline = false     # For checking if we have two consecutive newlines: end of list.
        count = 0           # Count of list items. Used to check if we need to push remaining
                            # content in `buffer` after leaving the `while` loop.
        while !eof(stream)
            if startswith(stream, "\n")
                if newline
                    # We have a double newline. Peek ahead to see if the next non-blank
                    # line is indented. If so, continue the list item.
                    saved_pos = position(stream)

                    #Skip any additional blank lines and check indntation
                    still_indented = false
                    while !eof(stream)
                        if startswith(stream, "\n")
                            continue
                        elseif startswith(stream, " "^indent)
                            still_indented = true
                            break
                        else
                            break
                        end
                    end
                    #Reset stream to position after the double newline we detected
                    seek(stream, saved_pos)
                    if still_indented
                        #Multiple blank lines within indented content - allow it
                        println(buffer)
                    else
                        # Double newline ends the current list
                        pushitem!(list, buffer)
                        break
                    end
                else
                    newline = true
                    println(buffer)
                end
            else
                if startswith(stream, " "^indent)
                    newline && (list.loose = true)
                    # Indented text that is part of the current list item.
                    print(buffer, readline(stream, keep=true))
                else
                    matched = startswith(stream, regex)
                    if isempty(matched)
                        # Unindented text meaning we have left the current list.
                        pushitem!(list, buffer)
                        break
                    else
                        # Start of a new list item.
                        newline && (list.loose = true)
                        count += 1

Review comment (suggestion):
```suggestion
                        # Multiple blank lines within indented content - allow it
```

Code after:
        newline = false     # For checking if we have two consecutive newlines: end of list.
        count = 0           # Count of list items. Used to check if we need to push remaining
                            # content in `buffer` after leaving the `while` loop.
        while !eof(stream)
            if startswith(stream, "\n")
                if newline
                    # We have a double newline. Peek ahead to see if the next non-blank
                    # line is indented. If so, continue the list item.
                    saved_pos = position(stream)

                    # Skip any additional blank lines and check indentation
                    still_indented = false
                    while !eof(stream)
                        if startswith(stream, "\n";eat = true)
                            continue
                        elseif startswith(stream, " "^indent; eat = false)
                            still_indented = true
                            break
                        else
                            break
                        end
                    end
                    # Reset stream to position after the double newline we detected
                    seek(stream, saved_pos)
                    if still_indented
                        # Multiple blank lines within indented content - allow it
                        println(buffer)
                    else
                        # Double newline ends the current list
                        pushitem!(list, buffer)
                        break
                    end
                else
                    newline = true
                    println(buffer)
                end
            else
                if startswith(stream, " "^indent)
                    newline && (list.loose = true)
                    # Indented text that is part of the current list item.
                    print(buffer, readline(stream, keep=true))
                else
                    matched = startswith(stream, regex)
                    if isempty(matched)
                        # Unindented text meaning we have left the current list.
                        pushitem!(list, buffer)
                        break
                    else
                        # Start of a new list item.
                        newline && (list.loose = true)
                        count += 1