Hyperlinks in ticket descriptions

This commit is contained in:
Tarrgon
2025-06-04 07:15:52 -04:00
parent 4aa3b8e0ca
commit 6fc76fd25d
4 changed files with 110 additions and 18 deletions
+1
View File
@@ -12,6 +12,7 @@ export * from './ms-to-human';
export * from './note-utils';
export * from './record-utils';
export * from './refresh-commands';
export * from './search-regex';
export * from './string-utils';
export * from './ticket-utils';
export * from './wait';
+14
View File
@@ -0,0 +1,14 @@
export const postIDRegex = new RegExp('post #([0-9]+)', 'gi');
export const userIDRegex = new RegExp('user #([0-9]+)', 'gi');
export const forumTopicIDRegex = new RegExp('topic #([0-9]+)', 'gi');
export const commentIDRegex = new RegExp('comment #([0-9]+)', 'gi');
export const blipIDRegex = new RegExp('blip #([0-9]+)', 'gi');
export const poolIDRegex = new RegExp('pool #([0-9]+)', 'gi');
export const setIDRegex = new RegExp('set #([0-9]+)', 'gi');
export const takedownIDRegex = new RegExp('takedown #([0-9]+)', 'gi');
export const recordIDRegex = new RegExp('record #([0-9]+)', 'gi');
export const ticketIDRegex = new RegExp('ticket #([0-9]+)', 'gi');
const tagSearchRegex = '(?:[\\S]| )+?';
export const wikiLinkRegex = new RegExp(`\\[\\[(${tagSearchRegex})]]`, 'gi');
export const searchLinkRegex = new RegExp(`{{(${tagSearchRegex})}}`, 'gi');