3 ms·
Loving the new Code Search! Might be super specific, but is there any syntax for searching attributes in HTML elements. For example if a React Component called
by catchmeifyoucan 3y ago
Loving the new Code Search! Might be super specific, but is there any syntax for searching attributes in HTML elements. For example if a React Component called <Button ...some-props color="red" /> what's the best way to find all the buttons that are red?
- colin353 3y agoHmm, you can construct a regular expression, something like: lang:tsx /<Button[^\\].\* color="red"/ Example: https://github.com/search?q=lang%3Atsx+%2F%3CButton%5B%5E%5C%5C%5D.*+color%3D%22red%22%2F&type=code https://github.com/search?q=lang%3Atsx+%2F%3CButton%5B%5E%5C...
- arthurcolle 3y agoYou can do code blocks with 4 consecutive spaces. Backticks are not supported unfortunately
- catchmeifyoucan 3y agoOoh nice, this looks great! Thanks!!