commonform-regexp-annotator
Advanced tools
Comparing version 1.0.0 to 1.0.1
var predicate = require('commonform-predicate') | ||
var name = require('./package').name | ||
@@ -15,3 +14,3 @@ function rule(expressions, annotator, form, path) | ||
annotations.push( | ||
message(form, elementPath, expression, match)) } }) } | ||
annotator(form, elementPath, expression, match)) } }) } | ||
return annotations }, | ||
@@ -18,0 +17,0 @@ [ ]) } |
{ | ||
"name": "commonform-regexp-annotator", | ||
"description": "create Common Form annotators from lists of regular expressions", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"author": "Kyle E. Mitchell <kyle@kemitchell.com> (http://kemitchell.com)", | ||
@@ -6,0 +6,0 @@ "devDependencies": { |
@@ -7,3 +7,3 @@ The module exports a single function that takes an array of `RegExp` and a function for generating annotations and returns an annotator function to apply to Common Forms. | ||
var expressions = [ | ||
new RegExp('\b(apple)\b', 'i'), | ||
new RegExp('\\b(apple)\\b', 'i'), | ||
/\b(thereof)\b/ ] | ||
@@ -35,2 +35,3 @@ ``` | ||
var assert = require('assert') | ||
assert.deepEqual( | ||
@@ -37,0 +38,0 @@ annotator({ content: [ 'Drop that apple and the stem thereof!' ] }), |
46
3643
36