From 506bb3e69974f99dc86ea84a23e0b15c2cf1d0ee Mon Sep 17 00:00:00 2001 From: ayaya Date: Fri, 7 Aug 2015 13:58:16 +0800 Subject: [PATCH] Add Ruby comment support --- lib/languages/rb.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 };