From 9bb89c5458ff5cf2601755220819afec741fdce8 Mon Sep 17 00:00:00 2001 From: Steven Levithan Date: Wed, 7 Aug 2024 14:22:48 +0200 Subject: [PATCH] Readme: Use absolute URL for dark logo --- README.md | 25 ++++++++++++------------- media/regex-logo-dark.svg | 1 + regex-logo.svg => media/regex-logo.svg | 0 regex-logo-dark.svg | 1 - 4 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 media/regex-logo-dark.svg rename regex-logo.svg => media/regex-logo.svg (100%) delete mode 100644 regex-logo-dark.svg diff --git a/README.md b/README.md index 3d115c3..bda5f11 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,16 @@
- - - - - regex logo - - - -[![build status](https://github.com/slevithan/regex/workflows/CI/badge.svg)](https://github.com/slevithan/regex/actions) -[![npm](https://img.shields.io/npm/v/regex)](https://www.npmjs.com/package/regex) -[![bundle size](https://deno.bundlejs.com/badge?q=regex&treeshake=[*])](https://bundlejs.com/?q=regex&treeshake=[*]) + + + + regex logo + + + +
+ + [![build status](https://github.com/slevithan/regex/workflows/CI/badge.svg)](https://github.com/slevithan/regex/actions) + [![npm](https://img.shields.io/npm/v/regex)](https://www.npmjs.com/package/regex) + [![bundle size](https://deno.bundlejs.com/badge?q=regex&treeshake=[*])](https://bundlejs.com/?q=regex&treeshake=[*])
`regex` is a template tag that extends JavaScript regular expressions with features that make them more powerful and dramatically more readable. It returns native `RegExp` instances that equal or exceed native performance. It's also lightweight, supports all ES2025 regex features, and can be used as a [Babel plugin](https://github.com/slevithan/babel-plugin-transform-regex) to avoid any runtime dependencies or added runtime cost. @@ -396,8 +397,6 @@ regex`\b(ab|cd)\b` > [!NOTE] > Flag n is based on .NET, C++, PCRE, Perl, and XRegExp, which share the n flag letter but call it *explicit capture*, *no auto capture*, or *nosubs*. In `regex`, the implicit flag n also prevents using numbered backreferences to refer to named groups in the outer regex, which follows the behavior of C++ (Ruby also always prevents this, despite not having flag n). Referring to named groups by number is a footgun, and the way that named groups are numbered is inconsistent across regex flavors. -> Aside: Flag n's behavior also enables `regex` to emulate atomic groups, subroutines, and recursion. - ## 🧩 Interpolation ### Interpolating regexes diff --git a/media/regex-logo-dark.svg b/media/regex-logo-dark.svg new file mode 100644 index 0000000..feada28 --- /dev/null +++ b/media/regex-logo-dark.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/regex-logo.svg b/media/regex-logo.svg similarity index 100% rename from regex-logo.svg rename to media/regex-logo.svg diff --git a/regex-logo-dark.svg b/regex-logo-dark.svg deleted file mode 100644 index 1f69afb..0000000 --- a/regex-logo-dark.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file