Incorrect results when the original text contains aribitrary whitespace throughout

Open
#7 0 comments 0 reactions 1 assignee View on GitHub

@dmnapolitano is already working on this.

Since Sep 25, 2019.

Assessment

This issue has not been assessed yet.

Description

bug

(Source)

original_text = """in Just-\nspring          when the world is mud-\nluscious the little\nlame balloonman\n\nwhistles          far          and wee\n\nand eddieandbill come\n   
running from marbles and\npiracies and it's\nspring\n\nwhen the world is puddle-wonderful\n\nthe queer\nold balloonman whistles\nfar          and             wee\nand bettyandisbel\
 come dancing\n\nfrom hop-scotch and jump-rope and\n\nit's\nspring\nand\n\n         the\n\n                  goat-footed\n\nballoonMan          whistles\nfar\nand\nwee"""
match.match(original_text, ["when", "the", "world", "is", "mud-luscious", 
"the", "little", "lame", "balloonman", "whistles", "far", "and", "wee"])

This produces incorrect results, failing to match all the way to the end of "wee" (let alone "whistles"):

[(25, 92, 'when the world is mud-\nluscious the little\nlame balloonman\n\nwhistle')]
Dominant language
Python
Stars
20
Forks
5
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from EducationalTestingService/match

All issues in EducationalTestingService/match

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.