This commit is contained in:
Jade (Rose) Rowland 2025-02-27 20:17:06 -05:00
parent 470a345296
commit 8867a843ac

View File

@ -1,6 +1,10 @@
const ALLOW_MANY = ['by', 'url', 'genre', 'license'];
export function getMetadata(raw_code) {
if (raw_code == null) {
console.error('saved pattern is empty or corrupted')
raw_code = '';
}
const comment_regexp = /\/\*([\s\S]*?)\*\/|\/\/(.*)$/gm;
const comments = [...raw_code.matchAll(comment_regexp)].map((c) => (c[1] || c[2] || '').trim());
const tags = {};