Skip to content

Conversation

zhouhuafei
Copy link

过滤掉sass文件中的注释

  • 使用getArray和getStructured时,发现被注释的内容也可以被解析。
  • 固增加此段代码,过滤掉sass文件中的注释。

@zhouhuafei zhouhuafei force-pushed the master branch 2 times, most recently from c5ebeba to b1b85ed Compare October 11, 2019 07:19
@ihorbond
Copy link

ihorbond commented Jul 31, 2020

I'd add inline comment regex
/\/\/.*/g instead of
strContents = strContents.split(LINE_BREAK).filter(v=> v.indexOf('//') === -1).join(LINE_BREAK);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants