mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Adding LESS to rake notes
This commit is contained in:
parent
e90f0e0eb6
commit
f3073773a3
3 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
* rake notes now searches *.less files
|
||||
|
||||
*Josh Crowder*
|
||||
|
||||
* Generate nested route for namespaced controller generated using
|
||||
`rails g controller`.
|
||||
Fixes #11532.
|
||||
|
|
|
@ -82,7 +82,7 @@ class SourceAnnotationExtractor
|
|||
case item
|
||||
when /\.(builder|rb|coffee|rake)$/
|
||||
/#\s*(#{tag}):?\s*(.*)$/
|
||||
when /\.(css|scss|sass|js)$/
|
||||
when /\.(css|scss|sass|less|js)$/
|
||||
/\/\/\s*(#{tag}):?\s*(.*)$/
|
||||
when /\.erb$/
|
||||
/<%\s*#\s*(#{tag}):?\s*(.*?)\s*%>/
|
||||
|
|
|
@ -25,6 +25,7 @@ module ApplicationTests
|
|||
app_file "app/assets/stylesheets/application.css", "// TODO: note in css"
|
||||
app_file "app/assets/stylesheets/application.css.scss", "// TODO: note in scss"
|
||||
app_file "app/assets/stylesheets/application.css.sass", "// TODO: note in sass"
|
||||
app_file "app/assets/stylesheets/application.css.less", "// TODO: note in less"
|
||||
app_file "app/controllers/application_controller.rb", 1000.times.map { "" }.join("\n") << "# TODO: note in ruby"
|
||||
app_file "lib/tasks/task.rake", "# TODO: note in rake"
|
||||
|
||||
|
@ -48,6 +49,7 @@ module ApplicationTests
|
|||
assert_match(/note in css/, output)
|
||||
assert_match(/note in scss/, output)
|
||||
assert_match(/note in sass/, output)
|
||||
assert_match(/note in less/, output)
|
||||
assert_match(/note in rake/, output)
|
||||
|
||||
assert_equal 10, lines.size
|
||||
|
|
Loading…
Reference in a new issue