From 78fdd5f65494d18ca8aa77b33c70632aba71968c Mon Sep 17 00:00:00 2001 From: Eyre_S Date: Mon, 27 Mar 2023 23:49:24 +0800 Subject: [PATCH] add regex highlight intro --- .../enhanced-frontend/test-regex-highlight.md | 19 ++++++++++++++++++- ph-bookshelf | 2 +- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/%root/test-collection/enhanced-frontend/test-regex-highlight.md b/%root/test-collection/enhanced-frontend/test-regex-highlight.md index a782286..353cc13 100644 --- a/%root/test-collection/enhanced-frontend/test-regex-highlight.md +++ b/%root/test-collection/enhanced-frontend/test-regex-highlight.md @@ -2,12 +2,20 @@ title: RegEx 着色 configurations: regex.highlight: 'true' + prism: 'true' --- # regex highight -[source](https://github.com/suk-ws/regex-colorizer) +[regex-colorizer]: https://github.com/suk-ws/regex-colorizer +[Prism]: https://prismjs.com + +[source][regex-colorizer] + + + +base colorized by *[regexr.com](https://regexr.com)* ^(?:https?://)?((?:(?:c\\.)?vx|fx|www\\.)?twitter\\.com)/((\w{1,})/status/(\d+)(?:/photo/(\d+))?)/?(\?[\w&=-]+)?$ +regex code auto-colorized by *[regex-colorizer]* ^(?:https?://)?((?:(?:c\\.)?vx|fx|www\\.)?twitter\\.com)/((\w{1,})/status/(\d+)(?:/photo/(\d+))?)/?(\?[\w&=-]+)?$ +regex code auto-colorized by *[Prism]* +`^(?:https?://)?((?:(?:c\.)?vx|fx|www\.)?twitter\.com)/((\w{1,})/status/(\d+)(?:/photo/(\d+))?)/?(\?[\w&=-]+)?$`{.lang-regex} + +regex code itself `^(?:https?://)?((?:(?:c\.)?vx|fx|www\.)?twitter\.com)/((\w{1,})/status/(\d+)(?:/photo/(\d+))?)/?(\?[\w&=-]+)?$` +regex code auto-colorized by *[regex-colorizer]* \\92\\1^\\d{0,3,5}\\n{9c}\\b{0,2}(\\B{,5}){3})\\01{}\\2{,}\\001${0,} +regex code itself `\92\1^\d{0,3,5}\n{9c}\b{0,2}(\b{,5}){3})\01{}\2{,}\001${0,}` +regex code auto-colorized by *[regex-colorizer]* ([A-Z])\\w+\\x7kk\\xaf5ke\\xne\\u17kc\\u1ea7nss +regex code itself `([A-Z])\w+\x7kk\xaf5ke\xne\u17kc\u1ea7nss` diff --git a/ph-bookshelf b/ph-bookshelf index 7f73bc1..1e56cbb 160000 --- a/ph-bookshelf +++ b/ph-bookshelf @@ -1 +1 @@ -Subproject commit 7f73bc1c1a79b86aa79c89365bab1f270f149b38 +Subproject commit 1e56cbb6342caa770b2df6dcc84d66b6bee0b06f