File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -271,12 +271,14 @@ for (let l in lines) {
271
271
272
272
// fix relative links (to examples)
273
273
if ( ! inCodeBlock && line . indexOf ( '](../examples/' ) >= 0 ) {
274
+ // links to examples go to learn site, links to yaml files go to wrapper html
274
275
line = line . replace ( / \( \. \. \/ e x a m p l e s \/ ( [ ^ ) ] + ) \) / g, function ( match , group1 ) {
275
276
console . warn ( "example link" , group1 ) ;
276
- //TODO: group1 = group1.replace('.yaml','.html');
277
+ group1 = group1 . replace ( '.yaml' , '.html' ) ;
277
278
return `(https://learn.openapis.org/examples/${ group1 } )` ;
278
279
} )
279
280
} else if ( ! inCodeBlock && line . indexOf ( '](../' ) >= 0 ) {
281
+ // links to other sibling files go to github
280
282
const regExp = / \( ( \. \. [ ^ ) ] + ) \) / g;
281
283
line = line . replace ( regExp , function ( match , group1 ) {
282
284
console . warn ( 'relative link' , group1 ) ;
You can’t perform that action at this time.
0 commit comments