Skip to content

Commit 19098b3

Browse files
committed
Warn about relative links
1 parent 6c42899 commit 19098b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/md2html/md2html.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,14 @@ for (let l in lines) {
272272
// fix relative links (to examples)
273273
if (!inCodeBlock && line.indexOf('](../examples/') >= 0) {
274274
line = line.replace(/\(\.\.\/examples\/([^)]+)\)/g,function(match,group1){
275+
console.warn("example link",group1);
275276
//TODO: group1 = group1.replace('.yaml','.html');
276277
return `(https://learn.openapis.org/examples/${group1})`;
277278
})
278279
} else if (!inCodeBlock && line.indexOf('](../') >= 0) {
279280
const regExp = /\((\.\.[^)]+)\)/g;
280281
line = line.replace(regExp,function(match,group1){
281-
console.warn('Fixing relative link',group1,line);
282+
console.warn('relative link',group1);
282283
return '('+url.resolve('https://github.com/OAI/OpenAPI-Specification/tree/main/versions/foo',group1)+')';
283284
});
284285
}

0 commit comments

Comments
 (0)