fix android runtime
parent
0726350570
commit
affe2c8508
|
@ -75,7 +75,7 @@ export function extractEntities(
|
||||||
let ents: Entity[] = []
|
let ents: Entity[] = []
|
||||||
{
|
{
|
||||||
// mentions
|
// mentions
|
||||||
const re = /(^|\s|\()(@)([a-zA-Z0-9\.-]+)(\b)/dg
|
const re = /(^|\s|\()(@)([a-zA-Z0-9\.-]+)(\b)/g
|
||||||
while ((match = re.exec(text))) {
|
while ((match = re.exec(text))) {
|
||||||
if (knownHandles && !knownHandles.has(match[3])) {
|
if (knownHandles && !knownHandles.has(match[3])) {
|
||||||
continue // not a known handle
|
continue // not a known handle
|
||||||
|
@ -95,7 +95,7 @@ export function extractEntities(
|
||||||
{
|
{
|
||||||
// links
|
// links
|
||||||
const re =
|
const re =
|
||||||
/(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/dgm
|
/(^|\s|\()((https?:\/\/[\S]+)|((?<domain>[a-z][a-z0-9]*(\.[a-z0-9]+)+)[\S]*))/gm
|
||||||
while ((match = re.exec(text))) {
|
while ((match = re.exec(text))) {
|
||||||
let value = match[2]
|
let value = match[2]
|
||||||
if (!value.startsWith('http')) {
|
if (!value.startsWith('http')) {
|
||||||
|
|
Loading…
Reference in New Issue