Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public pasteRules({ type }: ExtensionManagerMarkTypeParams) {
return [markPasteRule({ regexp: /(?:^|[^*_])(?:\*|_)([^*_]+)(?:\*|_)/g, type })];
}
}
public pasteRules({ type }: ExtensionManagerMarkTypeParams) {
return [markPasteRule({ regexp: /(?:`)([^`]+)(?:`)/g, type })];
}
}
public pasteRules({ type }: SchemaMarkTypeParams) {
return [markPasteRule(/(?:`)([^`]+)(?:`)/g, type)];
}
}
public pasteRules({ type }: ExtensionManagerMarkTypeParams) {
return [markPasteRule({ regexp: /~([^~]+)~/g, type })];
}
}
public pasteRules({ type }: SchemaMarkTypeParams) {
return [markPasteRule(/(?:^|[^*_])(?:\*|_)([^*_]+)(?:\*|_)/g, type)];
}
}
public pasteRules({ type }: ExtensionManagerMarkTypeParams) {
return [
markPasteRule({
regexp: extractUrl,
type,
getAttrs: url => {
return {
href: extractHref(getMatchString(url)),
};
},
}),
];
}
public pasteRules({ type }: SchemaMarkTypeParams) {
return [markPasteRule(/~([^~]+)~/g, type)];
}
}
public pasteRules({ type }: ExtensionManagerMarkTypeParams) {
return [
markPasteRule({
regexp: /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,
type,
getAttrs: url => ({ href: getMatchString(url) }),
}),
];
}
public pasteRules({ type }: SchemaMarkTypeParams) {
return [
markPasteRule({
regexp: /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_+.~#?&//=]*)/g,
type,
getAttrs: url => ({ href: getMatchString(url) }),
}),
];
}