Commit 93a92c84 authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Fixed linting issues with ldbrowser

parent 069d3bd786ae
...@@ -122,11 +122,12 @@ export function parseLinkTags(content: string): Tag[] { ...@@ -122,11 +122,12 @@ export function parseLinkTags(content: string): Tag[] {
let tags: Tag[] = []; let tags: Tag[] = [];
let regexp = RegExp("([a-zA-Z_0-9]+)\\s*=\\s*('[^']*'|\"[^\"]*\")", "g"); let regexp = RegExp("([a-zA-Z_0-9]+)\\s*=\\s*('[^']*'|\"[^\"]*\")", "g");
let match = regexp.exec(content); let match = regexp.exec(content);
if (match !== null) { while (match !== null) {
tags.push({ tags.push({
name: match[1], name: match[1],
value: match[2].substring(1, match[2].length - 1) value: match[2].substring(1, match[2].length - 1)
}); });
match = regexp.exec(content);
} }
return tags; return tags;
} }
...@@ -142,10 +143,11 @@ export function parseLinks(content: string): Link[] { ...@@ -142,10 +143,11 @@ export function parseLinks(content: string): Link[] {
"g" "g"
); );
let match = regexp.exec(content); let match = regexp.exec(content);
if (match !== null) { while (match !== null) {
let tags = parseLinkTags(match[0]); let tags = parseLinkTags(match[0]);
let link = new Link(match[1], tags); let link = new Link(match[1], tags);
links.push(link); links.push(link);
match = regexp.exec(content);
} }
return links; return links;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment