Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DetectTOC: only go for lines containing '...' words #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

DetectTOC: only go for lines containing '...' words #11

wants to merge 1 commit into from

Conversation

LoneRifle
Copy link

@LoneRifle LoneRifle commented Jul 27, 2019

DetectTOC will work on all lines, shaving off numbers from the last of
the words in a given line, so long as the word is not all full-stops.
This implies that a TOC line is one that contains strings containing
only full-stops, and so, DetectTOC should only work on such lines.

This change will remove unwanted behaviour where DetectTOC removes
trailing numbers that we actually want to keep in lines, eg:

Case Number : ABC 12/1234

This PR is a backport of opengovsg#33

DetectTOC will work on all lines, shaving off numbers from the last of
the words in a given line, so long as the word is not all full-stops.
This implies that a TOC line is one that contains strings containing
only full-stops, and so, DetectTOC should only work on such lines.

This change will remove unwanted behaviour where DetectTOC removes
trailing numbers that we actually want to keep in lines, eg:

   Case Number : ABC 12/1234
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant