mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-12-18 08:21:45 +03:00
Stupid g is cached between calls
https://stackoverflow.com/q/1520800/20838
This commit is contained in:
parent
46f5d7917c
commit
e2086a1156
1 changed files with 7 additions and 7 deletions
|
@ -19,14 +19,14 @@ function escapeHTML(html) {
|
||||||
|
|
||||||
const LINK_REGEX = /<a/i;
|
const LINK_REGEX = /<a/i;
|
||||||
const HTTP_LINK_REGEX = /^https?:\/\//i;
|
const HTTP_LINK_REGEX = /^https?:\/\//i;
|
||||||
const MENTION_REGEX = /^@[^@]+(@[^@]+)?$/g;
|
const MENTION_REGEX = /^@[^@]+(@[^@]+)?$/;
|
||||||
const HASHTAG_REGEX = /^#[^#]+$/g;
|
const HASHTAG_REGEX = /^#[^#]+$/;
|
||||||
const CODE_BLOCK_REGEX = /^```[^]+```$/g;
|
const CODE_BLOCK_REGEX = /^```[^]+```$/;
|
||||||
const CODE_BLOCK_START_REGEX = /^```/g;
|
const CODE_BLOCK_START_REGEX = /^```/;
|
||||||
const CODE_BLOCK_END_REGEX = /```$/g;
|
const CODE_BLOCK_END_REGEX = /```$/;
|
||||||
const INLINE_CODE_REGEX = /`[^`]+`/g;
|
const INLINE_CODE_REGEX = /`[^`]+`/;
|
||||||
const TWITTER_DOMAIN_REGEX = /(twitter|x)\.com/i;
|
const TWITTER_DOMAIN_REGEX = /(twitter|x)\.com/i;
|
||||||
const TWITTER_MENTION_REGEX = /@[a-zA-Z0-9_]+@(twitter|x)\.com/g;
|
const TWITTER_MENTION_REGEX = /@[a-zA-Z0-9_]+@(twitter|x)\.com/;
|
||||||
const TWITTER_MENTION_CAPTURE_REGEX = /(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g;
|
const TWITTER_MENTION_CAPTURE_REGEX = /(@([a-zA-Z0-9_]+)@(twitter|x)\.com)/g;
|
||||||
|
|
||||||
function createDOM(html, isDocumentFragment) {
|
function createDOM(html, isDocumentFragment) {
|
||||||
|
|
Loading…
Reference in a new issue