fallback
This commit is contained in:
parent
470a345296
commit
8867a843ac
1 changed files with 4 additions and 0 deletions
|
|
@ -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 = {};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue