Skip to content

Commit 83be46a

Browse files
janat08fregante
authored andcommitted
Add Markdown support to copy-file (#1974)
1 parent 2653318 commit 83be46a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

source/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ export const isSingleCommit = (): boolean => /^commit\/[0-9a-f]{5,40}/.test(getR
9393

9494
export const isSingleFile = (): boolean => /^blob\//.test(getRepoPath()!);
9595

96+
export const isMarkDown = (): boolean => isSingleFile() && getRepoPath()!.substr(-2) === 'md';
97+
9698
export const isTrending = (): boolean => location.pathname === '/trending' || location.pathname.startsWith('/trending/');
9799

98100
export const isUserProfile = (): boolean => select.exists('.user-profile-nav');

0 commit comments

Comments
 (0)