Make label form of url/link posting regex support mailto

indiachan-spamvector
Thomas Lynch 2 years ago
parent da7696b6c4
commit 1bba36b48e
  1. 2
      lib/post/markdown/markdown.js

@ -11,7 +11,7 @@ const greentextRegex = /^>((?!>\d+|>>/\w+(/\d*)?|>>#
, spoilerRegex = /\|\|([\s\S]+?)\|\|/gm
, detectedRegex = /\(\(\((.+?)\)\)\)/gm
/* eslint-disable no-useless-escape */
, linkRegex = /\[(?<label>[^\[][^\]]*?)\]\((?<url>(?:&#x2F;[^\s<>\[\]{}|\\^)]+|https?\:&#x2F;&#x2F;[^\s<>\[\]{}|\\^)]+))\)|(?<urlOnly>https?\:&#x2F;&#x2F;[^\s<>\[\]{}|\\^]+)/g
, linkRegex = /\[(?<label>[^\[][^\]]*?)\]\((?<url>(?:&#x2F;[^\s<>\[\]{}|\\^)]+|https?\:&#x2F;&#x2F;[^\s<>\[\]{}|\\^)]+|mailto:[\w.@]+))\)|(?<urlOnly>https?\:&#x2F;&#x2F;[^\s<>\[\]{}|\\^]+)/g
, codeRegex = /(?:(?<language>[a-z+]{1,14})\r?\n)?(?<code>[\s\S]+)/i
, includeSplitRegex = /(\[code\][\s\S]+?\[\/code\])/gm
, splitRegex = /\[code\]([\s\S]+?)\[\/code\]/gm

Loading…
Cancel
Save