Allow some docs to be turned off so they are only visible in the code.
This commit is contained in:
parent
1097e92ad3
commit
c970ad3269
@ -97,7 +97,7 @@ def mixins(item)
|
||||
comment = nil
|
||||
sass_tree.children.each do |child|
|
||||
if child.is_a?(Sass::Tree::MixinDefNode)
|
||||
child.comment = comment
|
||||
child.comment = comment && Sass::Tree::CommentNode.clean(comment)
|
||||
comment = nil
|
||||
mixins << child
|
||||
elsif child.is_a?(Sass::Tree::CommentNode)
|
||||
|
@ -150,6 +150,9 @@ module Sass
|
||||
attr_accessor :imported_filename unless method_defined? :imported_filename
|
||||
end
|
||||
class CommentNode < Node
|
||||
def self.clean(docstring)
|
||||
docstring.gsub(/@doc off(.*?)@doc on/m, '')
|
||||
end
|
||||
def docstring
|
||||
([value] + lines).join("\n")
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user