mirror of
https://github.com/twbs/bootstrap-sass.git
synced 2022-11-09 12:27:02 -05:00
More mixin pattern improvements
This commit is contained in:
parent
e9da9de5b5
commit
53e1e3ea52
1 changed files with 2 additions and 2 deletions
|
@ -145,7 +145,7 @@ private
|
|||
# .mixin() -> @import twbs-mixin()
|
||||
# #scope > .mixin() -> @import twbs-scope-mixin()
|
||||
def replace_mixins(less)
|
||||
mixin_pattern = /(\s*)(([#|\.][\w-]+\s*>\s*)*)\.([\w-]+\(.*\))\s*{?/
|
||||
mixin_pattern = /(\s*)(([#|\.][\w-]+\s*>\s*)*)\.([\w-]+\(.*\))/
|
||||
less.gsub(mixin_pattern) do |match|
|
||||
matches = match.scan(mixin_pattern).flatten
|
||||
scope = matches[1] || ''
|
||||
|
@ -159,7 +159,7 @@ private
|
|||
end
|
||||
|
||||
def replace_mixin_file(less)
|
||||
less.gsub(/^\.([\w-]+\(.*\)\s?{?)$/, '@mixin twbs-\1')
|
||||
less.gsub(/^(\s*)\.([\w-]+\(.*\))(\s*{)/, '\1@mixin twbs-\2\3')
|
||||
end
|
||||
|
||||
def replace_vars(less)
|
||||
|
|
Loading…
Reference in a new issue