mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Add stylus support
This commit is contained in:
@@ -32,7 +32,7 @@ module Linguist
|
|||||||
#
|
#
|
||||||
# Returns an array
|
# Returns an array
|
||||||
def self.detectable_markup
|
def self.detectable_markup
|
||||||
["CSS", "Less", "Sass", "TeX"]
|
["CSS", "Less", "Sass", "Stylus", "TeX"]
|
||||||
end
|
end
|
||||||
|
|
||||||
# Detect languages by a specific type
|
# Detect languages by a specific type
|
||||||
|
|||||||
@@ -1519,6 +1519,11 @@ Standard ML:
|
|||||||
- sml
|
- sml
|
||||||
primary_extension: .sml
|
primary_extension: .sml
|
||||||
|
|
||||||
|
Stylus:
|
||||||
|
type: markup
|
||||||
|
group: CSS
|
||||||
|
primary_extension: .styl
|
||||||
|
|
||||||
SuperCollider:
|
SuperCollider:
|
||||||
type: programming
|
type: programming
|
||||||
color: "#46390b"
|
color: "#46390b"
|
||||||
|
|||||||
@@ -363,6 +363,9 @@
|
|||||||
".sig",
|
".sig",
|
||||||
".sml"
|
".sml"
|
||||||
],
|
],
|
||||||
|
"Stylus": [
|
||||||
|
".styl"
|
||||||
|
],
|
||||||
"SuperCollider": [
|
"SuperCollider": [
|
||||||
".sc",
|
".sc",
|
||||||
".scd"
|
".scd"
|
||||||
|
|||||||
@@ -598,6 +598,11 @@ module Sinatra
|
|||||||
render :less, template, options, locals
|
render :less, template, options, locals
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def stylus(template, options={}, locals={})
|
||||||
|
options.merge! :layout => false, :default_content_type => :css
|
||||||
|
render :stylus, template, options, locals
|
||||||
|
end
|
||||||
|
|
||||||
def builder(template=nil, options={}, locals={}, &block)
|
def builder(template=nil, options={}, locals={}, &block)
|
||||||
options[:default_content_type] = :xml
|
options[:default_content_type] = :xml
|
||||||
render_ruby(:builder, template, options, locals, &block)
|
render_ruby(:builder, template, options, locals, &block)
|
||||||
|
|||||||
14
samples/Stylus/demo.styl
Normal file
14
samples/Stylus/demo.styl
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
border-radius()
|
||||||
|
-webkit-border-radius arguments
|
||||||
|
-moz-border-radius arguments
|
||||||
|
border-radius arguments
|
||||||
|
|
||||||
|
a.button
|
||||||
|
border-radius 5px
|
||||||
|
|
||||||
|
fonts = helvetica, arial, sans-serif
|
||||||
|
|
||||||
|
body {
|
||||||
|
padding: 50px;
|
||||||
|
font: 14px/1.4 fonts;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user