slashes in input string breaks matching
terion-name opened this issue · comments
Terion commented
import {minimatch} from 'minimatch';
const text = '<h1>123</h1>';
console.log(minimatch(text, '<h1>123</h1>')) // true
console.log(minimatch(text, '*123*')) // false
console.log(minimatch(text, '*')) // false
// BUT
const text2 = '<h1>123<h1>'; // remove slash
console.log(minimatch(text, '*123*')) // true
console.log(minimatch(text, '*')) // true
Terion commented
seems it's by design
isaacs commented
This is for matching file path strings, not html.