Fix Haml and Sass grouping and highlighting

This commit is contained in:
Joshua Peek
2011-09-16 13:54:10 -05:00
parent 1c24de490b
commit 5a584c095b
5 changed files with 47 additions and 0 deletions

View File

@@ -437,6 +437,7 @@ HaXe:
- .mtt
Haml:
group: HTML
type: markup
extensions:
- .haml
@@ -825,6 +826,12 @@ Rust:
- .rc
- .rs
SCSS:
type: markup
group: CSS
extensions:
- .scss
SQL:
type: data
searchable: false
@@ -832,6 +839,8 @@ SQL:
- .sql
Sass:
type: markup
group: CSS
extensions:
- .sass

3
test/fixtures/hello.haml vendored Normal file
View File

@@ -0,0 +1,3 @@
%p
Hello,
World!

11
test/fixtures/screen.sass vendored Normal file
View File

@@ -0,0 +1,11 @@
$blue: #3bbfce
$margin: 16px
.content-navigation
border-color: $blue
color: darken($blue, 9%)
.border
padding: $margin / 2
margin: $margin / 2
border-color: $blue

14
test/fixtures/screen.scss vendored Normal file
View File

@@ -0,0 +1,14 @@
$blue: #3bbfce;
$margin: 16px;
.content-navigation {
border-color: $blue;
color:
darken($blue, 9%);
}
.border {
padding: $margin / 2;
margin: $margin / 2;
border-color: $blue;
}

View File

@@ -348,6 +348,16 @@ class TestBlob < Test::Unit::TestCase
# https://github.com/Lexikos/AutoHotkey_L
assert_equal Language['AutoHotkey'], blob("hello.ahk").language
# Haml
assert_equal Language['Haml'], blob("hello.haml").language
assert_equal Language['HTML'], blob("hello.haml").language.group
# Sass
assert_equal Language['Sass'], blob("screen.sass").language
assert_equal Language['CSS'], blob("screen.sass").language.group
assert_equal Language['SCSS'], blob("screen.scss").language
assert_equal Language['CSS'], blob("screen.scss").language.group
end
def test_lexer