Skip to content

Commit 2dfca5b

Browse files
authored
chore: fix JavaScript lint errors
PR-URL: stdlib-js#9829 Closes: stdlib-js#9825 Reviewed-by: Philipp Burckhardt <pburckhardt@outlook.com>
1 parent 74650c6 commit 2dfca5b

File tree

1 file changed

+18
-18
lines changed
  • lib/node_modules/@stdlib/_tools/remark/plugins/remark-stdlib-urls-www/lib

1 file changed

+18
-18
lines changed

lib/node_modules/@stdlib/_tools/remark/plugins/remark-stdlib-urls-www/lib/transformer.js

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,24 @@ var RE_STDLIB = /^@stdlib\//;
4343
function factory( opts ) {
4444
return transformer;
4545

46+
/**
47+
* Callback invoked upon finding a matching node.
48+
*
49+
* @private
50+
* @param {Node} node - reference node
51+
*/
52+
function visitor( node ) {
53+
debug( 'Found a definition: %s', node.identifier );
54+
if ( RE_STDLIB.test( node.identifier ) ) {
55+
debug( 'Found a package identifier.' );
56+
57+
debug( 'Current URL: %s', node.url );
58+
node.url = opts.base + node.identifier;
59+
60+
debug( 'Resolved URL: %s', node.url );
61+
}
62+
}
63+
4664
/**
4765
* Transforms a Markdown abstract syntax tree (AST).
4866
*
@@ -53,24 +71,6 @@ function factory( opts ) {
5371
function transformer( tree ) {
5472
debug( 'Processing virtual file...' );
5573
visit( tree, 'definition', visitor );
56-
57-
/**
58-
* Callback invoked upon finding a matching node.
59-
*
60-
* @private
61-
* @param {Node} node - reference node
62-
*/
63-
function visitor( node ) {
64-
debug( 'Found a definition: %s', node.identifier );
65-
if ( RE_STDLIB.test( node.identifier ) ) {
66-
debug( 'Found a package identifier.' );
67-
68-
debug( 'Current URL: %s', node.url );
69-
node.url = opts.base + node.identifier;
70-
71-
debug( 'Resolved URL: %s', node.url );
72-
}
73-
}
7474
}
7575
}
7676

0 commit comments

Comments
 (0)