Skip to content

Commit b4682c0

Browse files
authored
Update codeit-autolinker.js
1 parent 43655c9 commit b4682c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/plugins/codeit-autolinker.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,18 +60,18 @@
6060

6161
//if (env.language === 'markdown') return;
6262

63-
if (env.type === 'url-reference') {
63+
if (env.language === 'markdown' &&
64+
env.type === 'url-reference') {
6465

6566
let matches = env.content.match(url);
6667

6768
if (matches && matches[0]) {
6869

6970
matches[0] = matches[0].replaceAll('\'','').replaceAll('"','').replaceAll('`','');
70-
71-
console.log(matches[0]);
72-
71+
7372
env.content.replace(matches[0], '<a class="token url-link" onclick="' + onClickEvent + '" href="'+ matches[0] + '">' + matches[0] + '</a>');
7473

74+
console.log(env.content);
7575
}
7676

7777
}

0 commit comments

Comments
 (0)