Skip to content

Non-highlighted words trimmed #14

@scriptcoded

Description

@scriptcoded

Describe the bug
When highlighting a query that either begins or ends with one or more words that are not highlighted, those words will be trimmed.

To Reproduce

  1. Run the following script:
    const { highlight } = require('../index')
    
    console.log(highlight('SELECT id FROM users'))
  2. Notice that the output is SELECT id FROM

Expected behavior
The output should be SELECT id FROM users

Node.js:

  • Version: v12.16.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions