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

Allow end as a substring of vertex id #224

Merged
merged 1 commit into from
Oct 15, 2015

Commits on Oct 14, 2015

  1. Allow end as a substring of vertex id

    Jison adds \b (word boundary) to literal string patterns by default.
    It does so, because it doesn't follow traditional match-longest
    approach, but does match-first instead. Without including word
    boundaries, it'd be hard to distinguish between a keyword and
    identifier.
    
    The pattern for `end` keyword is not a simple string literal - it
    swallows trailing whitespace, so we have to add \b manually.
    
    This partially fixes mermaid-js#184 - at least now `end` behaves the same as other
    keywords: it can be used as a prefix and infix, but not as a suffix.
    
    To solve this issue completely, ALPHA pattern would have to match
    multiple letters, which is a much bigger change.
    spect88 committed Oct 14, 2015
    Configuration menu
    Copy the full SHA
    b87764e View commit details
    Browse the repository at this point in the history