Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Commit 506bb3e

Browse files
author
ayaya
committed
Add Ruby comment support
1 parent 3655402 commit 506bb3e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/languages/rb.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
* Ruby
33
*/
44
module.exports = {
5-
// find document blocks between '=begin' and '=end'
6-
docBlocksRegExp: /\=begin\uffff?(.+?)\uffff?(?:\s*)?\=end/g,
7-
// remove not needed tabs at the beginning
8-
inlineRegExp: /^(\t*)?/gm
5+
// find document blocks between '#**' and '#*'
6+
// or between '=begin' and '=end'
7+
docBlocksRegExp: /#\*\*\uffff?(.+?)\uffff?(?:\s*)?#\*|=begin\uffff?(.+?)\uffff?(?:\s*)?=end/g,
8+
// remove not needed ' # ' and tabs at the beginning
9+
inlineRegExp: /^(\s*)?(#)[ ]?/gm
910
};

0 commit comments

Comments
 (0)