refactor
This commit is contained in:
parent
73de9be6d5
commit
bd7662e5e4
7 changed files with 29 additions and 20 deletions
|
@ -5,9 +5,7 @@ import { URL } from 'url';
|
|||
const urlRegex = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+/;
|
||||
const urlRegexFull = /^https?:\/\/[\w\/:%#@$&?!()\[\]~.,=+\-]+$/;
|
||||
|
||||
export function fromHtml(html: string, hashtagNames?: string[]): string | null {
|
||||
if (html == null) return null;
|
||||
|
||||
export function fromHtml(html: string, hashtagNames?: string[]): string {
|
||||
const dom = parse5.parseFragment(html);
|
||||
|
||||
let text = '';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue