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

Add support for rounding to end of sentence #22

Merged
merged 1 commit into from
Sep 2, 2014

Commits on Sep 1, 2014

  1. Add support for rounding to end of sentence

    Includes initial tests (all passing), though could do with more?
    
    If options.round is useds, then as the text is parsed, if it hits the character limit, it also checks to see if it's at the edge of a closing sentence tag . If not, it'll continue to scoop up the text.
    
    If the parser reaches a PARSER_TAG_COMMENCED character (`<`), then it peeks at the upcoming HTML, and checks if that tag would suggest the end of a sentence, i.e. a </p>, </div>, </li>, etc.
    remy committed Sep 1, 2014
    Configuration menu
    Copy the full SHA
    5bf701a View commit details
    Browse the repository at this point in the history