Skip to content

Commit ea528d5

Browse files
committed
feat: support for multiline comment for languages that use default regex
1 parent 59b6637 commit ea528d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/server/code-parse/language/default/codecrumbs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const compact = require('lodash/compact');
22
const { CC_NODE_TYPE, NO_TRAIL_FLOW } = require('../../../shared-constants');
33

44
const CRUMB_REGEX = /cc|codecrumb/;
5-
const DEFAULT_COMMENT_REGEX = /^([^\/\/]*)\/\/(.*)$/;
5+
const DEFAULT_COMMENT_REGEX = /\/\*[\s\S]*?\*\/|([^:]|^)\/\/.*$/gm;
66

77
const getCommentNodeValue = node => (node.value || '').trim();
88

0 commit comments

Comments
 (0)