jquery-highlighttextarea icon indicating copy to clipboard operation
jquery-highlighttextarea copied to clipboard

Allow regex objects

Open mistic100 opened this issue 11 years ago • 1 comments

The words parameter accept regex stored as strings ONLY (used with RegExp object) Should also directly accept RegExp object for nicer syntax and choice of flags

words:[
 'string regex', // used with gm or igm flags
  /litteral regex/gm,
  new RegExp('custom string regex', 'm')
]

mistic100 avatar Dec 12 '14 09:12 mistic100

In the meantime, it may be helpful to update the documentation at http://garysieling.github.io/jquery-highlighttextarea/ to better explain that currently, the words parameter can only accept strings.

JoshuaCWebDeveloper avatar May 11 '16 17:05 JoshuaCWebDeveloper