Skip to content

Commit

Permalink
feat: support for multiline comment for languages that use default regex
Browse files Browse the repository at this point in the history
  • Loading branch information
idoo committed Aug 5, 2019
1 parent 41a2b51 commit 662479c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/server/code-parse/language/perl/codecrumbs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { setupGetCrumbs, setupGetCommentsFromCode } = require('../default/codecrumbs');

const PERL_COMMENT_REGEX = /^([^#]*)#(.*)$/;
const PERL_COMMENT_REGEX = /^([^#]*)#(.*)$/g;
const getCrumbs = setupGetCrumbs(setupGetCommentsFromCode(PERL_COMMENT_REGEX));

// replace with own implementation if needed
Expand Down
2 changes: 1 addition & 1 deletion src/server/code-parse/language/python/codecrumbs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { setupGetCrumbs, setupGetCommentsFromCode } = require('../default/codecrumbs');

const PYTHON_COMMENT_REGEX = /^([^#]*)#(.*)$/;
const PYTHON_COMMENT_REGEX = /^([^#]*)#(.*)$/g;
const getCrumbs = setupGetCrumbs(setupGetCommentsFromCode(PYTHON_COMMENT_REGEX));

// replace with own implementation if needed
Expand Down
2 changes: 1 addition & 1 deletion src/server/code-parse/language/ruby/codecrumbs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { setupGetCrumbs, setupGetCommentsFromCode } = require('../default/codecrumbs');

const RUBY_COMMENT_REGEX = /^([^#]*)#(.*)$/;
const RUBY_COMMENT_REGEX = /^([^#]*)#(.*)$/g;
const getCrumbs = setupGetCrumbs(setupGetCommentsFromCode(RUBY_COMMENT_REGEX));

// replace with own implementation if needed
Expand Down

0 comments on commit 662479c

Please sign in to comment.