Skip to content

Parsing bug on triple quotes #108

Description

@turicas

Hi! First of all, thanks for creating this project. :)

I've found a parsing bug related to triple quotes. This is how to reproduce:

If I create a file named test.py with the following contents:

def test():
    """this is a test
    this line will break parsing because triple quotes finish here, not the next line."""
    pass

Then, run:

pycco test.py

And open docs/test.html in the browser, I'll get:

pycco-parsing-bug

If I change the file to:

def test():
    """this is a test
    this line will break parsing because triple quotes finish here, not the next line.
    """
    pass

Then the output will be:

pycco-parsing-2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions