mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +01:00
Remove newline from regex for shortcode
This commit is contained in:
parent
9235d2c800
commit
ffbae70178
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ const HASHTAG_RE = new RegExp(
|
|||
// https://github.com/mastodon/mastodon/blob/23e32a4b3031d1da8b911e0145d61b4dd47c4f96/app/models/custom_emoji.rb#L31
|
||||
const SHORTCODE_RE_FRAGMENT = '[a-zA-Z0-9_]{2,}';
|
||||
const SCAN_RE = new RegExp(
|
||||
`([^A-Za-z0-9_:\\n]|^)(:${SHORTCODE_RE_FRAGMENT}:)(?=[^A-Za-z0-9_:]|$)`,
|
||||
`(^|[^=\\/\\w])(:${SHORTCODE_RE_FRAGMENT}:)(?=[^A-Za-z0-9_:]|$)`,
|
||||
'g',
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue