diff --git a/lib/languages/rb.js b/lib/languages/rb.js index ea4c544..3e91e36 100644 --- a/lib/languages/rb.js +++ b/lib/languages/rb.js @@ -2,8 +2,9 @@ * Ruby */ module.exports = { - // find document blocks between '=begin' and '=end' - docBlocksRegExp: /\=begin\uffff?(.+?)\uffff?(?:\s*)?\=end/g, - // remove not needed tabs at the beginning - inlineRegExp: /^(\t*)?/gm + // find document blocks between '#**' and '#*' + // or between '=begin' and '=end' + docBlocksRegExp: /#\*\*\uffff?(.+?)\uffff?(?:\s*)?#\*|=begin\uffff?(.+?)\uffff?(?:\s*)?=end/g, + // remove not needed ' # ' and tabs at the beginning + inlineRegExp: /^(\s*)?(#)[ ]?/gm };