diff options
| author | Georg Brandl <georg@python.org> | 2021-01-18 21:24:00 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2021-01-18 22:08:36 +0100 |
| commit | 2a3d3a7d5b9c60dedf6638d876161d9563faebcf (patch) | |
| tree | 809c0b4a686db98f5954afa1944404cd9652c6b2 /tests/lexers/slim | |
| parent | f0445be718da83541ea3401aad882f3937147263 (diff) | |
| download | pygments-git-examplefiles.tar.gz | |
Move test_examplefiles to new tests/lexers scheme.examplefiles
Diffstat (limited to 'tests/lexers/slim')
| -rw-r--r-- | tests/lexers/slim/example.txt | 210 |
1 files changed, 210 insertions, 0 deletions
diff --git a/tests/lexers/slim/example.txt b/tests/lexers/slim/example.txt new file mode 100644 index 00000000..6b17ecc6 --- /dev/null +++ b/tests/lexers/slim/example.txt @@ -0,0 +1,210 @@ +---input--- +doctype html +html + head + title Slim Examples + meta name="keywords" content="template language" + meta name="author" content=author + javascript: + alert('Slim supports embedded javascript!') + + body + h1 Markup examples + + #content + p This example shows you how a basic Slim file looks like. + + == yield + + - unless items.empty? + table + - for item in items do + tr + td.name = item.name + td.price = item.price + - else + p + | No items found. Please add some inventory. + Thank you! + + div id="footer" + = render 'footer' + | Copyright (C) #{year} #{author} + +---tokens--- +'' Text +'doctype' Name.Tag +' html' Text +'\n' Text + +'' Text +'html' Name.Tag +'\n' Text + +' ' Text +'head' Name.Tag +'\n' Text + +' ' Text +'title' Name.Tag +' Slim Examples' Text +'\n' Text + +' ' Text +'meta' Name.Tag +' name' Name.Attribute +'=' Punctuation +'"' Literal.String.Double +'keywords' Literal.String.Double +'"' Literal.String.Double +' content' Name.Attribute +'=' Punctuation +'"' Literal.String.Double +'template language' Literal.String.Double +'"' Literal.String.Double +'\n' Text + +' ' Text +'meta' Name.Tag +' name' Name.Attribute +'=' Punctuation +'"' Literal.String.Double +'author' Literal.String.Double +'"' Literal.String.Double +' content' Name.Attribute +'=' Punctuation +'author' Text +'\n' Text + +' ' Text +'javascript:\n' Text + +" alert('Slim supports embedded javascript!')" Text +'\n' Text + +'\n' Text + +' ' Text +'body' Name.Tag +'\n' Text + +' ' Text +'h1' Name.Tag +' Markup examples' Text +'\n' Text + +'\n' Text + +' ' Text +'#content' Name.Function +'\n' Text + +' ' Text +'p' Name.Tag +' This example shows you how a basic Slim file looks like.' Text +'\n' Text + +'\n' Text + +' ' Text +'==' Punctuation +' ' Text +'yield' Keyword +'\n' Text + +'\n' Text + +' ' Text +'-' Punctuation +' ' Text +'unless' Keyword +' ' Text +'items' Name +'.' Operator +'empty?' Name +'\n' Text + +' ' Text +'table' Name.Tag +'\n' Text + +' ' Text +'-' Punctuation +' ' Text +'for' Keyword +' ' Text +'item' Name +' ' Text +'in' Keyword +' ' Text +'items' Name +' ' Text +'do' Keyword +'\n' Text + +' ' Text +'tr' Name.Tag +'\n' Text + +' ' Text +'td' Name.Tag +'.name' Name.Class +' =' Punctuation +' ' Text +'item' Name +'.' Operator +'name' Name +'\n' Text + +' ' Text +'td' Name.Tag +'.price' Name.Class +' =' Punctuation +' ' Text +'item' Name +'.' Operator +'price' Name +'\n' Text + +' ' Text +'-' Punctuation +' ' Text +'else' Keyword +'\n' Text + +' ' Text +'p' Name.Tag +'\n' Text + +' ' Text +'| No items found. Please add some inventory.\n' Text + +' ' Text +'Thank you!' Text +'\n' Text + +'\n' Text + +' ' Text +'div' Name.Tag +' id' Name.Attribute +'=' Punctuation +'"' Literal.String.Double +'footer' Literal.String.Double +'"' Literal.String.Double +'\n' Text + +' ' Text +'=' Punctuation +' ' Text +'render' Name +' ' Text +"'" Literal.String.Single +'footer' Literal.String.Single +"'" Literal.String.Single +'\n' Text + +' ' Text +'| Copyright (C) #{year} #{author}\n' Text + +'' Text |
