Open lukaszsobek opened 6 years ago
Sorry about option documentation. Looking at the source code there seems to be a wrap object that contain all the wrap options.
Technically it was made so all method can feed from the same option object, but I can see how it is confusing.
const options = {
wrap: {
tagOpen: '<mark class="highlight">',
tagClose: "</mark>"
}
};
const html = fuzzyAldrin.wrap(candidateString, query, options);
I'll consider making "mark" a default as #38
@jeancroy that would be great!
Trying to make the
.wrap
method produce slightly different tags than default I call:however the custom tagOpen and tagClose are not being acted on. Is this a bug, or does passing options work differently?