├── .github ├── CONTRIBUTING.md └── FUNDING.yml ├── .gitignore ├── LICENSE ├── README.md ├── issues ├── 0000.psp ├── 0274.html ├── 0397.html ├── 0411-2.jsx ├── 0411.jsx ├── 0412.psp ├── 0414.djhtml ├── 0415.erb ├── 0416.djhtml ├── 0417.djhtml ├── 0424.jsx ├── 0428.psp ├── 0430.jsx ├── 0433.psp ├── 0434.chtml ├── 0435.psp ├── 0439.epl ├── 0441.js ├── 0444.epl ├── 0445.jsx ├── 0446.jsx ├── 0447.psp ├── 0451.psp ├── 0453.blade.php ├── 0457.psp ├── 0458.dust ├── 0459.blade.html ├── 0461.erb ├── 0465.djhtml ├── 0466.djhtml ├── 0480.psp ├── 0484.mas ├── 0486.html ├── 0491.jsx ├── 0492.erb ├── 0504.jinja ├── 0510.jsx ├── 0511.jsx ├── 0512.blade.php ├── 0523.jsx ├── 0524.php ├── 0530.erb ├── 0532.jsx ├── 0536.psp ├── 0537.psp ├── 0538.psp ├── 0540.psp ├── 0542.erb ├── 0545.vtl ├── 0547.psp ├── 0548.html ├── 0561.js ├── 0561.jsx ├── 0564.js ├── 0565.erb ├── 0573.jsx ├── 0576.jsx ├── 0577.erb ├── 0587.html ├── 0591.jsx ├── 0596.underscore.html ├── 0598.css ├── 0601.psp ├── 0607.blade.php ├── 0608.tt ├── 0609.jsx ├── 0611.jsx ├── 0612.html ├── 0613.jsx ├── 0614.hbs ├── 0615.jsx ├── 0619.jsx ├── 0620.jsp ├── 0621.jsx ├── 0623.jsp ├── 0626.jsp ├── 0627.js ├── 0632.jsx ├── 0633.js ├── 0635.html ├── 0637.js ├── 0638.js ├── 0644.psp ├── 0645.js ├── 0648.html ├── 0649.erb ├── 0650.xml ├── 0651.psp ├── 0653.css ├── 0654.html ├── 0655.html ├── 0657.tpl ├── 0658.psp ├── 0659.jsx ├── 0660.psp ├── 0665.scala.html ├── 0669.djhtml ├── 0670.erb ├── 0674.jsx ├── 0679.html ├── 0688.psp ├── 0691-small.html ├── 0691.html ├── 0691.jsx ├── 0691bis.html ├── 0696.js ├── 0701.jsp ├── 0702.psp ├── 0703.ftl ├── 0705.mako ├── 0708.html ├── 0709.erb.html ├── 0712.html ├── 0716.chtml ├── 0717.html ├── 0720.chtml ├── 0721.chtml ├── 0722.html ├── 0725.cshtml ├── 0728.psp ├── 0731.html ├── 0732.html ├── 0738.jsx ├── 0739.jsx ├── 0741.html ├── 0742.html ├── 0743.html ├── 0745.axvw ├── 0749.cshtml ├── 0752.chtml ├── 0757.html ├── 0759.html ├── 0761.html ├── 0762.html ├── 0764.ejs ├── 0765.underscore.html ├── 0767.html ├── 0775.jsx ├── 0779.jsx ├── 0783.jsx ├── 0786.dust ├── 0787.jsx ├── 0789.html ├── 0791.psp ├── 0796.psp ├── 0800.js ├── 0801.jsx ├── 0802.js ├── 0805.djhtml ├── 0807.js ├── 0810.jsx ├── 0814.html ├── 0815.html ├── 0817.html ├── 0823.html ├── 0824.js ├── 0827.js ├── 0830.jsx ├── 0831.js ├── 0839.html ├── 0840.twig ├── 0855.jsx ├── 0856.razor ├── 0857.html ├── 0864.html ├── 0866.js ├── 0868.soy ├── 0870.jsx ├── 0872.jsx ├── 0876.css ├── 0877.jsx ├── 0880.jsx ├── 0882.jsx ├── 0883.erb ├── 0887.html ├── 0895.html ├── 0903.psp ├── 0904.jsx ├── 0905.html ├── 0911.js ├── 0912.ftl ├── 0913.html ├── 0915.twig ├── 0920.jsx ├── 0923.soy ├── 0924.html ├── 0925.html ├── 0926.vue ├── 0928.vue ├── 0929.html ├── 0930.twig ├── 0936.html ├── 0938.html ├── 0939.psp ├── 0940.twig ├── 0944.html ├── 0945.html ├── 0947.html ├── 0949.html ├── 0951.html ├── 0952.jsx ├── 0954.erb ├── 0955.djhtml ├── 0956.html ├── 0957.djhtml ├── 0959.js ├── 0960.jsx ├── 0961.js ├── 0970.gohtml ├── 0976.twig ├── 0978.psp ├── 0979.html ├── 0983.jsx ├── 0984.html ├── 0987.eex ├── 0988.scala.html ├── 0989.js ├── 0992.jsx ├── 0995.blade.php ├── 0998.html ├── 1000.html ├── 1002.blade.php ├── 1003.html ├── 1006.html ├── 1009.html ├── 1013.html ├── 1014.html ├── 1016.js ├── 1020.html ├── 1021.js ├── 1022.jsx ├── 1023.vue ├── 1024.psp ├── 1027.jsx ├── 1029.blade.php ├── 1032.html ├── 1034.blade.php ├── 1037.html ├── 1042.jsx ├── 1046.html ├── 1047.erb ├── 1052.js ├── 1053.html ├── 1057-angular.component.html ├── 1072.js ├── 1073.html ├── 1080.html ├── 1085.mako ├── 1086.html ├── 1089.psp ├── 1091.vue ├── 1092.ee ├── 1093.html ├── 1096.html ├── 1097.jsx ├── 1101.razor ├── 1103.html ├── 1105.html ├── 1108.vue.html ├── 1109.blade.php ├── 1116.blade.php ├── 1119.djhtml ├── 1126.jsx ├── 1128.js ├── 1132.epl ├── 1145.djhtml ├── 1147.jsx ├── 1148.jsx ├── 1150.html ├── 1151.html ├── 1158.css ├── 1160.html ├── 1162.jsx ├── 1164.asp ├── 1165.vue ├── 1168.php ├── 1169.svelte ├── 1171.djhtml ├── 1173.php ├── 1176.jsx ├── 1178.html ├── 1188.eex ├── 1193.jsx ├── 1198.erb ├── 1209.cshtml ├── 1212.psp ├── 1215.heex ├── 1221.html ├── 1226.djhtml ├── 1228.html ├── 1229.html.erb ├── 1230.twig ├── 1233.svelte ├── 1238.css.html ├── 1239.perl.html ├── 1243.vue ├── 1245.css.html ├── 1246.anki ├── 1247.astro ├── 1252.js ├── 1255.jsx ├── 1256.ts ├── 1257.html ├── 1259.ts ├── 1262.antlers.html ├── 1265.blade.php ├── 1268.psp ├── 1275.djhtml ├── 1279.asp ├── 1286.blade.php ├── 1294.html ├── 1296.erb ├── 1299.jsx ├── 1300.blade.php ├── 1303.ftl ├── 1308.jsx ├── 1310.jsx ├── 1311.blade.php ├── 1313.jsx ├── 1315.blade.php ├── 998.html ├── XXX.jsx ├── test.component.html ├── test.jsx ├── test.psp └── test.ts ├── run.sh ├── tests ├── test.blade.php ├── test.chtml ├── test.css ├── test.css.erb ├── test.djhtml ├── test.dtl ├── test.eex ├── test.ejs ├── test.epl ├── test.erb ├── test.ftl ├── test.gohtml ├── test.hero ├── test.html ├── test.js ├── test.js.erb ├── test.jsp ├── test.jsx ├── test.jsx.html ├── test.marko ├── test.mas ├── test.mustache ├── test.psp ├── test.riot.tag ├── test.scss ├── test.soy ├── test.sql.psp ├── test.svelte ├── test.tpl ├── test.tt └── test.vtl └── web-mode.el /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Web-Mode 2 | 3 | Things that might be useful in your report 4 | 5 | * an accurate description of the issue 6 | * an example on gist (a screenshot of the code is a bad idea because it can not be copy/paste) 7 | * the output of ```M-x web-mode-debug``` 8 | * lines in the * *Messages* * buffer related to the issue (if they exist) 9 | * a screenshot (if needed) 10 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | github: fxbois 2 | custom: ["https://www.paypal.me/fxbois"] 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | \#*\# 3 | *.elc 4 | .#* 5 | .DS_Store 6 | _err.* 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | web-mode.el 2 | ========= 3 | 4 | web-mode.el is an emacs major mode for editing **web templates** aka HTML files embedding parts (CSS/JavaScript) and blocks (pre rendered by client/server side engines). 5 | 6 | web-mode.el is compatible with many template engines: PHP, JSP, ASP, Django, Twig, Jinja, Mustache, ERB, FreeMarker, Velocity, Cheetah, Smarty, CTemplate, Mustache, Blade, ErlyDTL, Go Template, Dust.js, Google Closure (soy), React/JSX, Angularjs, ejs, Nunjucks, etc. 7 | 8 | More infos on https://web-mode.org/ 9 | 10 | ![ScreenShot](http://web-mode.org/web-mode.png?v=5) 11 | 12 | [![paypal.me](https://web-mode.org/images/PayPal.svg)](https://www.paypal.me/fxbois) 13 | 14 | [![MELPA](http://melpa.org/packages/web-mode-badge.svg)](http://melpa.org/#/web-mode) 15 | 16 | [![MELPA Stable](http://stable.melpa.org/packages/web-mode-badge.svg)](http://stable.melpa.org/#/web-mode) 17 | -------------------------------------------------------------------------------- /issues/0000.psp: -------------------------------------------------------------------------------- 1 | 2 | 13 | 14 | 15 |
16 | 17 |
20 | test 21 | 22 | xx 23 | 26 |
27 |
28 |
29 | -------------------------------------------------------------------------------- /issues/0274.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /issues/0397.html: -------------------------------------------------------------------------------- 1 |
2 | text 3 |
4 | -------------------------------------------------------------------------------- /issues/0411-2.jsx: -------------------------------------------------------------------------------- 1 | var ColumnSelect = React.createClass({ 2 | propTypes: { 3 | value: React.PropTypes.any, 4 | schema: React.PropTypes.object, 5 | onChange: React.PropTypes.func 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /issues/0411.jsx: -------------------------------------------------------------------------------- 1 | function hello() { 2 | 3 | return ( 4 |
5 | {somevar} 6 |
7 |
8 | Column1 9 |
10 |
11 | Column2 12 |
13 |
14 |
15 | ); 16 | 17 | } 18 | 19 | Landing = React.createClass({ 20 | render: function() { 21 | return ( 22 | 27 | ); 28 | } 29 | }); 30 | -------------------------------------------------------------------------------- /issues/0412.psp: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /issues/0414.djhtml: -------------------------------------------------------------------------------- 1 |

3 | the open control block above is inside an html attr

xqsx 4 | -------------------------------------------------------------------------------- /issues/0415.erb: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/0416.djhtml: -------------------------------------------------------------------------------- 1 | 87 | 88 | 89 | 90 | ', '' ); 92 | } 93 | tha_header_bottom(); ?> 94 | 2 | 3 | 4 | <% inner() %> 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /issues/0486.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /issues/0491.jsx: -------------------------------------------------------------------------------- 1 | function makeFoo (n) { 2 | return 6 | } 7 | -------------------------------------------------------------------------------- /issues/0492.erb: -------------------------------------------------------------------------------- 1 | <% form_for Foo do |f| %> 2 | <%= f.text_field :bar_1 %> 3 | <%= f.text_field :bar_2 %> 4 | <% end %> 5 | 6 | <% form_for Foo do |form| %> 7 | <%= form.text_field :bar_1 %> 8 | <%= form.text_field :bar_2 %> 9 | <% end %> 10 | -------------------------------------------------------------------------------- /issues/0504.jinja: -------------------------------------------------------------------------------- 1 |
2 | {% set foo = 'bar' %} 3 | 4 | {% if someting %} 5 | 6 | {% trans %} 7 | 8 | {% endtrans %} 9 | 10 | {% else %} 11 | 12 | {% for x in [1, 2, 3] %} 13 | a 14 | {% else %} 15 | b 16 | {% endfor %} 17 | 18 | {% endif %} 19 | 20 |
21 | -------------------------------------------------------------------------------- /issues/0510.jsx: -------------------------------------------------------------------------------- 1 | @decorator1() 2 | @decorator2() 3 | @decorator3() 4 | class Name { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /issues/0511.jsx: -------------------------------------------------------------------------------- 1 |
2 | {123} 3 | {x 4 |
5 | -------------------------------------------------------------------------------- /issues/0512.blade.php: -------------------------------------------------------------------------------- 1 |
2 | This is a test. {{ URL::action('someaction', 3 | [$arg]) }} 4 |
5 | -------------------------------------------------------------------------------- /issues/0523.jsx: -------------------------------------------------------------------------------- 1 | return ( 2 | 3 | 4 | {this.props.children} 5 | 6 | 7 | ); 8 | -------------------------------------------------------------------------------- /issues/0524.php: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/0530.erb: -------------------------------------------------------------------------------- 1 | <%= simple_form_for @post, 2 | url: post_url(@post), 3 | html: { data: { title: 'post' } } do |f| %> 4 |
5 |
6 | <% end %> 7 | 8 | 9 | <%= simple_form_for @user do |f| %> 10 | <%= f.input :username, label_html: { class: 'my_class' } %> 11 | <%= f.input :password, hint: false, error_html: { id: 'password_error'} %> 12 | <%= f.input :password_confirmation, label: false %> 13 | <%= f.button :submit %> 14 | <% end %> 15 | 16 | 17 | <%= simple_form_for @post, 18 | url: post_url(@post), 19 | html: { data: { title: 'post' } } do |f| %> 20 | <% label_tag do %> 21 | 22 | <% end %> 23 | <% end %> 24 | -------------------------------------------------------------------------------- /issues/0532.jsx: -------------------------------------------------------------------------------- 1 | React.createClass({ 2 | render: function() { 3 | const elem = [ 4 | {this.renderModalOnTop()} 5 | ]; 6 | return elem[0]; 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /issues/0536.psp: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /issues/0537.psp: -------------------------------------------------------------------------------- 1 | 6 | 7 | var test; 8 | 9 | function initialize() 10 | { 11 | alert(3); 12 | } 13 | 14 | 15 | 16 | 17 | EOTHTML; 18 | -------------------------------------------------------------------------------- /issues/0538.psp: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /issues/0540.psp: -------------------------------------------------------------------------------- 1 |
2 | 17 |
18 | -------------------------------------------------------------------------------- /issues/0542.erb: -------------------------------------------------------------------------------- 1 |
2 |
3 | <% 4 | a = [ 5 | [1, 2], 6 | [3, 4] 7 | ] 8 | b = 10 9 | %> 10 |
11 |
12 | -------------------------------------------------------------------------------- /issues/0545.vtl: -------------------------------------------------------------------------------- 1 |
2 | 3 | #if(true) something #end 4 | 5 | #set( $value = $foo + 1 ) 6 | 7 |
8 | -------------------------------------------------------------------------------- /issues/0547.psp: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | -------------------------------------------------------------------------------- /issues/0548.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/0561.js: -------------------------------------------------------------------------------- 1 | var test = function(){ 2 | var n = 10; 3 | 4 | switch (n){ 5 | case: 6 | console.log("test"); 7 | break; 8 | case: 9 | break; 10 | } 11 | 12 | }); 13 | 14 | AppDispatcher.register(function(action){ 15 | var n = 10; 16 | 17 | switch (n){ 18 | case 9: 19 | console.log(n); 20 | break; 21 | case 10: 22 | break; 23 | } 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /issues/0561.jsx: -------------------------------------------------------------------------------- 1 | var test = function(){ 2 | var n = 10; 3 | 4 | switch (n){ 5 | case: 6 | console.log("test"); 7 | break; 8 | case: 9 | break; 10 | } 11 | 12 | }); 13 | 14 | AppDispatcher.register(function(action){ 15 | var n = 10; 16 | 17 | switch (n){ 18 | case 9: 19 | console.log(n); 20 | break; 21 | case 10: 22 | break; 23 | } 24 | }); 25 | -------------------------------------------------------------------------------- /issues/0564.js: -------------------------------------------------------------------------------- 1 | function test() { 2 | } 3 | -------------------------------------------------------------------------------- /issues/0565.erb: -------------------------------------------------------------------------------- 1 |
2 | 6 |
7 | -------------------------------------------------------------------------------- /issues/0573.jsx: -------------------------------------------------------------------------------- 1 | function f() { 2 | var x = true ?
: ''; 3 | return x; // pressing tab doesn't indent. 4 | } 5 | 6 | function f2() { 7 | // pressing tab here indents to the opening brace. :( 8 | } 9 | -------------------------------------------------------------------------------- /issues/0576.jsx: -------------------------------------------------------------------------------- 1 | var MyClass = react.createClass({ 2 | render: function() { 3 | var hello =
4 | 5 |
; 6 | return hello; 7 | } 8 | }); 9 | -------------------------------------------------------------------------------- /issues/0577.erb: -------------------------------------------------------------------------------- 1 |
2 | <%= link_to 'Back', not_return_path %> 3 |
4 | -------------------------------------------------------------------------------- /issues/0587.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 17 | 18 | 19 | 20 | 23 | -------------------------------------------------------------------------------- /issues/0591.jsx: -------------------------------------------------------------------------------- 1 | import React, { Component, PropTypes } from 'react' 2 | 3 | export default class MatchRow extends Component { 4 | render() { 5 | return ( 6 | 11 | 12 | 13 | 17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /issues/0596.underscore.html: -------------------------------------------------------------------------------- 1 |
2 | <% 3 | var title_text = ""; 4 | var expand_text = ""; 5 | if (1) { 6 | title_text = "foo"; 7 | expand_text = "Add Key"; 8 | } 9 | %> 10 |
11 | -------------------------------------------------------------------------------- /issues/0598.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fxbois/web-mode/be2d59c8fa02b1a45ae54ce4079e502e659cefe6/issues/0598.css -------------------------------------------------------------------------------- /issues/0601.psp: -------------------------------------------------------------------------------- 1 | 4 | 7 |
8 | renderNothing( "organisation_name" ); 12 | return; 13 | } 14 | ?> 15 |
16 | -------------------------------------------------------------------------------- /issues/0607.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | @yield('title') - BoardSoc 5 | 6 | 7 | 8 | 9 | 10 | {!! Navbar::top()->withBrand('Foo') !!} 11 | 12 | {!! Navbar::top() 13 | ->withBrand('Card/BoardSoc') 14 | ->withContent( 15 | Navigation::links([ 16 | [ 17 | 'title' => 'Home', 18 | 'link' => route('home'), 19 | ], 20 | [ 21 | 'title' => 'About/Contact', 22 | 'link' => route('about'), 23 | ], 24 | [ 25 | 'title' => 'Events', 26 | 'link' => route('events.index'), 27 | ], 28 | [ 29 | 'title' => 'Library', 30 | 'link' => route('library.index'), 31 | ], 32 | [ 33 | 'title' => 'Achievements', 34 | 'link' => route('achievements.index'), 35 | ], 36 | [ 37 | 'title' => 'Admin', 38 | 'link' => route('admin.index'), 39 | 'callback' => function() { 40 | return Auth::check() && Auth::user()->is_committee; 41 | } 42 | ], 43 | ]) 44 | ) 45 | ->withContent( 46 | $loginFormOrLogoutLink 47 | ) 48 | !!} 49 | 50 | @yield('page-header') 51 | 52 | @if (Session::has('flash_notification.message')) 53 |
54 |
55 | 61 | 62 | {{ Session::get('flash_notification.message') }} 63 |
64 |
65 | @endif 66 | 67 | @foreach($errors->all() as $error) 68 |
69 |
70 | {{ $error }} 71 |
72 |
73 | @endforeach 74 | 75 | @yield('content') 76 | 77 | 78 |
79 |
80 |
81 |
82 |

About

83 |
84 |

85 | BoardSoc is a student society of the University of 86 | Sheffield, focused on playing modern(ish) board games. 87 | Interested in more information? Then 88 | {!! link_to_route('about', 'read more here') !!}! 89 |

90 |
91 |
92 |

Social Links

93 |
94 |

95 | 96 | 97 |

98 |
99 |
100 |

Our Bunker

101 |
102 |
103 | Sheffield Card/BoardSoc
104 | University Of Sheffield
105 | 10-12 Brunswick Street
106 | Sheffield, Eng S10 2FN 107 |
108 |
109 | 110 |
111 |
112 |
113 | 114 | 115 | {!! Helpers::js() !!} 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | -------------------------------------------------------------------------------- /issues/0608.tt: -------------------------------------------------------------------------------- 1 | %% IF condition 2 |

Hello

3 | %% END 4 | instead of 5 | 6 | [% IF condition -%] 7 |

Hello

8 | [% END -%] 9 | 10 | %%# dcd 11 | -------------------------------------------------------------------------------- /issues/0609.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default React.createClass({ 4 | getPair: function () { 5 | return this.props.pair || []; 6 | }, 7 | isDisabled: function () { 8 | return !!this.props.hasVoted; 9 | }, 10 | hasVotedFor: function (entry) { 11 | return this.props.hasVoted === entry; 12 | }, 13 | render: function () { 14 | return ( 15 |
16 | {this.props.winner ? 17 |
18 | Winner is {this.props.winner}! 19 |
: 20 | this.getPair().map(entry => 21 | 29 | )} 30 |
31 | ); 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /issues/0611.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export default React.createClass({ 4 | getPair: function () { 5 | return this.props.pair || []; 6 | }, 7 | isDisabled: function () { 8 | return !!this.props.hasVoted; 9 | }, 10 | hasVotedFor: function (entry) { 11 | return this.props.hasVoted === entry; 12 | }, 13 | render: function () { 14 | return ( 15 |
16 | {this.props.winner ? 17 |
18 | Winner is {this.props.winner}! 19 |
: 20 | this.getPair().map(entry => 21 | 29 | )} 30 |
31 | ); 32 | } 33 | }); 34 | -------------------------------------------------------------------------------- /issues/0612.html: -------------------------------------------------------------------------------- 1 |
2 | #aaa #aaaaaa 3 |
4 | -------------------------------------------------------------------------------- /issues/0613.jsx: -------------------------------------------------------------------------------- 1 | var ExampleComponent = React.createClass({ 2 | render: function () { 3 | return ( 4 |
5 |
6 |
7 | ) 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /issues/0614.hbs: -------------------------------------------------------------------------------- 1 |
2 | {{foo-block foo1=bar1 foo2="bar2" foo3=(inner-helper "bar3")}} 3 |
4 | -------------------------------------------------------------------------------- /issues/0615.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import {Row, Col, Glyphicon, Input, 3 | Breadcrumb, BreadcrumbItem} from 'react-bootstrap'; 4 | 5 | export default React.createClass({ 6 | render: function () { 7 | const breadcrumb = ( 8 | 9 | 10 | 11 | 12 | { (this.props.scope.get('type') !== "home") ? 13 | 14 | {this.props.scope.get('scope') || this.props.scope.get('parent')} 15 | : null} 16 | { this.props.scope.get('type') === "topic" ? 17 | 18 | {this.props.scope.get('value')} 19 | : null 20 | } 21 | 22 | ); 23 | const innerGlyphicon = ; 24 | 25 | return ( 26 | 27 | 28 | {breadcrumb} 29 | 30 | 31 | 32 | 33 | 34 | ); 35 | } 36 | }); 37 | -------------------------------------------------------------------------------- /issues/0619.jsx: -------------------------------------------------------------------------------- 1 | class Square extends React.Component { 2 | constructor(props) { 3 | super(props); 4 | this.state = { 5 | value: null, 6 | }; 7 | } 8 | 9 | render() { 10 | return ( 11 | 14 | ); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /issues/0620.jsp: -------------------------------------------------------------------------------- 1 |
2 | Not commented 3 | <%-- xs -- %> 4 | Commented 5 | <%-- --%> 6 | Not commented again 7 |
8 | -------------------------------------------------------------------------------- /issues/0621.jsx: -------------------------------------------------------------------------------- 1 | // Same results if Label and Input are not imported 2 | import { React, Component } from 'react' 3 | import { Label, Input } from 'react-bootstrap' 4 | 5 | export default class Test extends Component { 6 | render() { 7 | return ( 8 | 17 | ) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /issues/0623.jsp: -------------------------------------------------------------------------------- 1 |
2 | 3 |
4 | -------------------------------------------------------------------------------- /issues/0626.jsp: -------------------------------------------------------------------------------- 1 |
2 | <%-- 3 | Test --%> 4 | 5 | <%-- --%> 6 | Words 7 | <%-- --%> 8 | 9 |
10 | -------------------------------------------------------------------------------- /issues/0627.js: -------------------------------------------------------------------------------- 1 | class Test { 2 | constructor() { 3 | super(...arguments); 4 | let a = 1 // This should not indent. 5 | } 6 | } 7 | 8 | 9 | const a = {} 10 | const b = { 11 | ...a, // This should indent. 12 | ...b, 13 | ...c 14 | } 15 | 16 | newB.firstMethod('x') 17 | .secondMethod('y') 18 | .thirdMethod(1,15,'z'); 19 | -------------------------------------------------------------------------------- /issues/0632.jsx: -------------------------------------------------------------------------------- 1 | export default class App extends Component { 2 | render() { 3 | return ( 4 |
5 | 7 | console.log('add todo', text); 8 | } 9 | /> 10 | 24 | console.log('todo clicked', index) 25 | } 26 | /> 27 |
30 | console.log('filter change', filter) 31 | } 32 | /> 33 |
34 | ); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /issues/0633.js: -------------------------------------------------------------------------------- 1 | test1() {} 2 | test2 = () => {} 3 | -------------------------------------------------------------------------------- /issues/0635.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /issues/0637.js: -------------------------------------------------------------------------------- 1 | function test() { 2 | switch (q) { 3 | case 'a': 4 | return a; 5 | case 'b': 6 | return b; 7 | case 'c': 8 | return c; 9 | case 'd': 10 | return d; 11 | default: 12 | return []; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /issues/0638.js: -------------------------------------------------------------------------------- 1 | if (x && 2 | y) { 3 | return 1; 4 | } 5 | -------------------------------------------------------------------------------- /issues/0644.psp: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /issues/0645.js: -------------------------------------------------------------------------------- 1 | router.get('/alerts', (request, response) => { 2 | const query = request.query; 3 | }); 4 | 5 | router.get('/alerts', function(request, response) { 6 | const query = request.query; 7 | }); 8 | 9 | // Basic syntax: 10 | (param1, param2, paramN) => { statements } 11 | (param1, param2, paramN) => expression 12 | // equivalent to: => { return expression; } 13 | 14 | // Parentheses are optional when there's only one argument: 15 | (singleParam) => { statements } 16 | singleParam => { statements } 17 | 18 | // A function with no arguments requires parentheses: 19 | () => { statements } 20 | 21 | // Advanced: 22 | // Parenthesize the body to return an object literal expression: 23 | params => ({foo: bar}) 24 | 25 | // Rest parameters are supported 26 | (param1, param2, ...rest) => { statements } 27 | -------------------------------------------------------------------------------- /issues/0648.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/0649.erb: -------------------------------------------------------------------------------- 1 | <% layout.columns.each do |col| %> 2 | 3 | <%= best_in_place(expense, col) %> 4 | 5 | <% end %> 6 | -------------------------------------------------------------------------------- /issues/0650.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /issues/0651.psp: -------------------------------------------------------------------------------- 1 |
2 | 12 |
13 | -------------------------------------------------------------------------------- /issues/0653.css: -------------------------------------------------------------------------------- 1 | @import url('https://fonts.googleapis.com/css?family=Merriweather'); 2 | 3 | $red: #f00; 4 | 5 | body { 6 | margin: 0; 7 | padding: 0; 8 | background: #722; 9 | } 10 | 11 | #features { 12 | margin:0; 13 | } 14 | -------------------------------------------------------------------------------- /issues/0654.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/0655.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Navbar Template for Bootstrap 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /issues/0657.tpl: -------------------------------------------------------------------------------- 1 |
2 | {if $condition} 3 | this aligned to { 4 | {else} 5 | so do this 6 | {/if} 7 | 8 | {foreach $items as $i} 9 | {$i} 10 | {/foreach} 11 | 12 |
13 | -------------------------------------------------------------------------------- /issues/0658.psp: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /issues/0659.jsx: -------------------------------------------------------------------------------- 1 | function foo() { 2 | return ; 11 | } 12 | -------------------------------------------------------------------------------- /issues/0660.psp: -------------------------------------------------------------------------------- 1 | 4 | 5 | @foo(bar: String) = { 6 | @for(i <- 1 to 10) { 7 |
8 | @i 9 |
10 | } 11 | @if(bar == "bar") { 12 |
@bar
13 | } 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /issues/0669.djhtml: -------------------------------------------------------------------------------- 1 |
2 |
3 | {% csrf_token %} 4 | 5 | {{ form.as_table }} 6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /issues/0670.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | <%= render "form.html", changeset: @changeset, 4 | action: trade_path(@conn, :update, @trade) %> 5 | -------------------------------------------------------------------------------- /issues/0674.jsx: -------------------------------------------------------------------------------- 1 | import React, { 2 | Component 3 | } from 'react'; 4 | 5 | class CheckList extends Component { 6 | myTestFunc() { 7 | if (test) { 8 | if (test2) { 9 | console.log("Broken"); 10 | } 11 | } 12 | } 13 | render() { 14 | let tasks = this.props.tasks.map( 15 | (task) => ( 16 |
  • 17 | 18 | {task.name} 19 | 20 |
  • 21 | )); 22 | return ( 23 |
    24 |
      {tasks}
    25 | 26 |
    27 | ); 28 | } 29 | } 30 | 31 | export default CheckList; 32 | -------------------------------------------------------------------------------- /issues/0679.html: -------------------------------------------------------------------------------- 1 |
    2 | cd 3 |
    4 | -------------------------------------------------------------------------------- /issues/0688.psp: -------------------------------------------------------------------------------- 1 | 2 | 3 | var CommentList = React.createClass({ 4 | render: function() { 5 | var comments = this.props.data.map(function(comment) { 6 | return ( 7 | 8 | {csomment.text} 9 | 10 | ); 11 | }); 12 | } 13 | }); 14 | 15 | 16 | -------------------------------------------------------------------------------- /issues/0691.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | React Tutorial 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
    15 | 16 | 149 | 150 | 151 | -------------------------------------------------------------------------------- /issues/0691.jsx: -------------------------------------------------------------------------------- 1 | var data = [ 2 | {id: 1, author: "Pete Hunt", text: "This is one comment"}, 3 | {id: 2, author: "Jordan Walke", text: "This is *another* comment"} 4 | ]; 5 | 6 | var Comment = React.createClass({ 7 | rawMarkup: function() { 8 | var rm = marked(this.props.children.toString(), {sanitize: true}); 9 | return { __html: rm }; 10 | }, 11 | 12 | render: function() { 13 | return ( 14 |
    15 |

    16 | {this.props.author} 17 |

    18 | 19 |
    20 | ); 21 | } 22 | }); 23 | 24 | var CommentList = React.createClass({ 25 | render: function() { 26 | var comments = this.props.data.map(function(comment) { 27 | return ( 28 | 29 | {comment.text} 30 | 31 | ); 32 | }); 33 | 34 | return ( 35 |
    36 | {comments} 37 |
    38 | ); 39 | } 40 | }); 41 | 42 | var CommentForm = React.createClass({ 43 | getInitialState: function() { 44 | return { author: '', text: '' }; 45 | }, 46 | 47 | handleAuthorChange: function(e) { 48 | this.setState({author: e.target.value}); 49 | }, 50 | 51 | handleTextChange: function(e) { 52 | this.setState({text: e.target.value}); 53 | }, 54 | 55 | handleSubmit: function(e) { 56 | e.preventDefault(); 57 | var author = this.state.author.trim(); 58 | var text = this.state.text.trim(); 59 | if (!text || !author) { 60 | return; 61 | } 62 | // TODO: send request to the server 63 | this.props.onCommentSubmit({author: author, text: text}); 64 | this.setState({author: '', text: ''}); 65 | }, 66 | 67 | render: function() { 68 | return ( 69 |
    70 | 71 | 72 | 73 |
    74 | ); 75 | } 76 | }); 77 | 78 | var CommentBox = React.createClass({ 79 | loadCommentsFromServer: function() { 80 | $.ajax({ 81 | url: this.props.url, 82 | dataType: 'json', 83 | cache: false, 84 | success: function(data) { 85 | this.setState({data: data}); 86 | }.bind(this), 87 | error: function(xhr, status, err) { 88 | console.error(this.props.url, status, err.toString()); 89 | }.bind(this) 90 | }); 91 | }, 92 | 93 | handleCommentSubmit: function(comment) { 94 | $.ajax({ 95 | url: this.props.url, 96 | dataType: 'json', 97 | type: 'POST', 98 | data: comment, 99 | success: function(data) { 100 | this.setState({data: data}); 101 | }.bind(this), 102 | error: function(xhr, status, err) { 103 | console.error(this.props.url, status, err.toString()); 104 | }.bind(this) 105 | }); 106 | }, 107 | 108 | getInitialState: function() { 109 | return {data: []}; 110 | }, 111 | 112 | componentDidMount: function() { 113 | this.loadCommentsFromServer(); 114 | setInterval(this.loadCommentsFromServer, this.props.pollInterval); 115 | }, 116 | 117 | render: function() { 118 | return ( 119 |
    120 |

    Comments

    121 | 122 | 123 |
    124 | ); 125 | } 126 | }); 127 | 128 | ReactDOM.render( 129 | , 130 | document.getElementById('content') 131 | ); 132 | -------------------------------------------------------------------------------- /issues/0691bis.html: -------------------------------------------------------------------------------- 1 | 25 | -------------------------------------------------------------------------------- /issues/0696.js: -------------------------------------------------------------------------------- 1 | foo() { 2 | // cdcd 3 | bar() 4 | baz() 5 | if(true) 6 | hello(); 7 | if (true) //csdc 8 | hello(); 9 | 10 | } 11 | 12 | if ( value.length < fieldSpec.minNumberOfChar || 13 | value.length > fieldSpec.maxNumberOfChar || 14 | value.match( fieldSpec.pattern) ) 15 | return true; 16 | -------------------------------------------------------------------------------- /issues/0701.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 2 | ... 3 | 4 | 5 | -------------------------------------------------------------------------------- /issues/0702.psp: -------------------------------------------------------------------------------- 1 | 2 | <#--- 3 | -- | 4 | --> 5 | 6 | -------------------------------------------------------------------------------- /issues/0705.mako: -------------------------------------------------------------------------------- 1 | <%block filter="collect_js"> 2 | // js content 3 | var x; 4 | 5 | and 6 | 7 | <%block filter="collect_css"> 8 | span { width:10px; } 9 | 10 | -------------------------------------------------------------------------------- /issues/0708.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/0709.erb.html: -------------------------------------------------------------------------------- 1 |
    2 |

    3 |

    4 | <% store_states.each do |state| %> 5 | <% unless state.first.blank? %> 6 | <%= state.first %>  7 | <% if state.first == "MT" %> 8 | Yes 9 | <% end %> 10 | <% end %> 11 | <% end %> 12 |
    13 |

    14 |
    15 | -------------------------------------------------------------------------------- /issues/0712.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /issues/0716.chtml: -------------------------------------------------------------------------------- 1 | {{foo foo-with-hyphens="bar" prop1="bar" prop2='bar' prop=(or a (and b c) d e) }} 2 | -------------------------------------------------------------------------------- /issues/0717.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /issues/0720.chtml: -------------------------------------------------------------------------------- 1 |
    2 | {{foo prop=(or a (and b c) d e)}} 3 |
    4 | -------------------------------------------------------------------------------- /issues/0721.chtml: -------------------------------------------------------------------------------- 1 | 2 |
    3 | {{#if foo}} 4 | {{#each bar}} 5 | foo 6 | {{else}} 7 | bar 8 | {{/each}} 9 | {{/if}} 10 |
    11 | 12 |
    13 | {{#if foo}} 14 | foo 15 | {{else}} 16 | bar 17 | {{/if}} 18 |
    19 | -------------------------------------------------------------------------------- /issues/0722.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /issues/0725.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /issues/0728.psp: -------------------------------------------------------------------------------- 1 |
    2 | ]*)?>(.*?)<\/h[123456]>/i', // h1 - h6 6 | '/[ ]*<(p)( [^>]*)?>(.*?)<\/p>[ ]*/si', //

    with surrounding whitespace. 7 | '/<(br)[^>]*>[ ]*/i', //
    with leading whitespace after the newline. 8 | '/<(b)( [^>]*)?>(.*?)<\/b>/i', // 9 | '/<(strong)( [^>]*)?>(.*?)<\/strong>/i', // 10 | '/<(th)( [^>]*)?>(.*?)<\/th>/i', // and 11 | '/<(a) [^>]*href=("|\')([^"\']+)\2([^>]*)>(.*?)<\/a>/i' // 12 | ); 13 | 14 | ?> 15 |

    16 | -------------------------------------------------------------------------------- /issues/0731.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /issues/0732.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/0738.jsx: -------------------------------------------------------------------------------- 1 | const AComponent = ({arg1, arg2, arg3}) => ( 2 |

    {arg1} {arg2} {arg3}

    3 | ) 4 | -------------------------------------------------------------------------------- /issues/0739.jsx: -------------------------------------------------------------------------------- 1 | export default React.createClass({ 2 | getInitialState() { 3 | return { num: this.getRandomNumber() }; 4 | }, 5 | 6 | getRandomNumber(): number { 7 | return Math.ceil(Math.random() * 6); 8 | }, 9 | render(): any { 10 | return 11 | ; 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /issues/0741.html: -------------------------------------------------------------------------------- 1 |
      2 |
    • zzz
    • 3 |
    • ccccc
    • 4 |
    • xsdcqsdv sdqv
    • 5 |
    • csqcd
    • 6 |
    7 | -------------------------------------------------------------------------------- /issues/0742.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/0743.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /issues/0745.axvw: -------------------------------------------------------------------------------- 1 | 2 | Free Capacity 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | select 'Water Usage Comparison' water_usage_label, 14 | 'Water Cost Comparison' water_cost_label, 15 | sum(case 16 | when b.time_period like '2013-%' 17 | then a.qty_volume * c.area_fraction 18 | else 0 19 | end) base_usage_hcf 20 | from bill_line_archive a 21 | join bill_archive b 22 | on a.bill_id = b.bill_id 23 | join rsc_primary_building c 24 | on b.bl_id = c.primary_bl_id 25 | and a.meterseq = c.meterseq 26 | join bl d 27 | on c.bl_id = d.bl_id 28 | join vn e 29 | on a.vn_id = e.vn_id 30 | where b.bill_type_id = 'WATER' 31 | 32 | 33 | 34 | Water Usage 35 | 36 | 37 | Water Cost 38 | 39 | 40 | 2013 Usage (HCF) 41 | 42 | 43 | 44 | 45 |
    46 | 47 | 48 | 53 | 54 | 55 | 56 | 7 days 57 | 58 | Previous week 59 | 65 | 66 | 67 | 68 | 69 | -------------------------------------------------------------------------------- /issues/0749.cshtml: -------------------------------------------------------------------------------- 1 | @* toto *@ 2 | 3 | @if (something) { 4 | var x; 5 | } 6 | else { 7 | var y; 8 | } 9 | -------------------------------------------------------------------------------- /issues/0752.chtml: -------------------------------------------------------------------------------- 1 |
    2 | {{^block}} is not highlighted, 3 | {{object.key}} - dot notation highlight is broken. 4 |
    5 | 6 | 7 |
    8 | {{#object.key}} is closing to {{/object.key}} 9 | {{#object_list}} is closing to {{/object_list}} 10 |
    11 | -------------------------------------------------------------------------------- /issues/0757.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /issues/0759.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | cd 5 | -------------------------------------------------------------------------------- /issues/0761.html: -------------------------------------------------------------------------------- 1 | 6 | wq 7 | -------------------------------------------------------------------------------- /issues/0762.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /issues/0764.ejs: -------------------------------------------------------------------------------- 1 |
    2 | 3 | <% if (1) { %> 4 | 5 | <% } else { %> 6 | 7 | <% } %> 8 | 9 | 10 | 11 | test test test 12 | 13 | -------------------------------------------------------------------------------- /issues/0765.underscore.html: -------------------------------------------------------------------------------- 1 |
    2 |
    3 | <% _.each(images, function(value, imageid) { %> 4 | <% if (isadmin) { %> 5 |
    6 | <% } else { %> 7 | 8 | <% } %> 9 | <% } %> 10 | 11 | 12 | -------------------------------------------------------------------------------- /issues/0767.html: -------------------------------------------------------------------------------- 1 | 21 | -------------------------------------------------------------------------------- /issues/0775.jsx: -------------------------------------------------------------------------------- 1 | var React = require('react') 2 | 3 | return React.render( 4 |
    5 | { 6 | conditional && 7 | 8 | } 9 | 10 |
    11 | Hello 12 |
    13 |
    14 | ); 15 | 16 | React.createClass({ 17 | render() { 18 | return ( 19 |
      cqsd 20 | { (this.props.scope.get('type') !== "home") ? 21 | 22 | {this.props.scope.get('scope') || this.props.scope.get('parent')} 23 | : null} 24 |
    25 | ); 26 | } 27 | }); 28 | -------------------------------------------------------------------------------- /issues/0779.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | 4 | /* var React = require('react');*/ 5 | 6 | class App extends React.Component { 7 | render() { 8 | return ( 9 |
    10 | Hello World!!!
    11 | {1 + 1} 12 | {/* Here is some kind of comment in React */} 13 |
    14 | ); 15 | } 16 | } 17 | 18 | export default App; 19 | 20 | /* export default (props) => { 21 | * return

    Hello, World!

    ; 22 | * }*/ 23 | 24 | 25 | ReactDOM.render(, document.getElementById('example')); 26 | -------------------------------------------------------------------------------- /issues/0783.jsx: -------------------------------------------------------------------------------- 1 | export default class Header extends Component { 2 | render() { 3 | return ( 4 |
    7 | {this.getChildren()} 8 |
    ); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /issues/0786.dust: -------------------------------------------------------------------------------- 1 |
    2 |
    3 |
    4 | Information... 5 |
    6 |
    7 |
    8 | 15 |
    16 | 33 | 47 | 56 | -------------------------------------------------------------------------------- /issues/0787.jsx: -------------------------------------------------------------------------------- 1 | export default class Header extends Component { 2 | render() { 3 | return ( 4 |
    8 | {this.getChildren()} 9 |
    ); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /issues/0789.html: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 15 | 16 |
    17 | 32 |
    33 | -------------------------------------------------------------------------------- /issues/0791.psp: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /issues/0796.psp: -------------------------------------------------------------------------------- 1 |
    2 | 8 |
    9 | 15 | -------------------------------------------------------------------------------- /issues/0800.js: -------------------------------------------------------------------------------- 1 | const hello = { 2 | [a]: 3 | (args) => { 4 | // indents correctly 5 | }, 6 | [b]: 7 | (args) => { 8 | // indents all the way up here 9 | }, 10 | [c]: (args) => { 11 | // even worse 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /issues/0801.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | class Example extends Component { 4 | render() { 5 | return ( 6 |
    7 | {this.props.condition ? ( 8 | 9 | ) : ( 10 | 11 | )} 12 |
    13 | ) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /issues/0802.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | import React from 'react'; 4 | import { mount, shallow } from 'enzyme'; 5 | import {expect} from 'chai'; 6 | -------------------------------------------------------------------------------- /issues/0805.djhtml: -------------------------------------------------------------------------------- 1 |
    2 | {% graph %} 3 | xsxs 4 | {% endgraph %} 5 | 6 | {% if block %} 7 | Content 8 | {% endif %} 9 | 10 | {% javascript %} 11 | var x = 1; 12 | {% endjavascript %} 13 | 14 |
    15 | -------------------------------------------------------------------------------- /issues/0807.js: -------------------------------------------------------------------------------- 1 | Relay.createContainer(Story, { 2 | initialVariables: { 3 | numCommentsToShow: 10, 4 | showComments: false, 5 | }, 6 | fragments: { 7 | story: (variables) => Relay.QL` 8 | fragment on Story { 9 | comments(first: $numCommentsToShow) @include(if: $showComments) { 10 | edges { 11 | node { 12 | author { name }, 13 | id, 14 | text, 15 | }, 16 | }, 17 | }, 18 | } 19 | `, 20 | } 21 | }); 22 | 23 | // An inline fragment - useful in small quantities, but best not to share 24 | // between modules. 25 | var userFragment = Relay.QL` 26 | fragment on User { 27 | name, 28 | } 29 | `; 30 | Relay.createContainer(Story, { 31 | fragments: { 32 | bar: () => Relay.QL` 33 | fragment on Story { 34 | author { 35 | # Fetch the same information about the story's author ... 36 | ${userFragment}, 37 | }, 38 | comments { 39 | edges { 40 | node { 41 | author { 42 | # ... and the authors of the comments. 43 | ${userFragment}, 44 | }, 45 | }, 46 | }, 47 | }, 48 | } 49 | `, 50 | } 51 | }); 52 | -------------------------------------------------------------------------------- /issues/0810.jsx: -------------------------------------------------------------------------------- 1 | f() { 2 | const a =
    3 | const b =
    4 | } 5 | 6 | class C { 7 | render() { 8 | if (a) 9 | return
    A
    10 | return
    B
    11 | } 12 | } 13 | -------------------------------------------------------------------------------- /issues/0814.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
    9 |
    foo<%= value.creator %>
    foobar
    10 | 11 | 12 | 13 | 14 |
    xxcdc
    15 | 16 | 17 |
    18 | 19 | 20 |
    21 |
    22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /issues/0815.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/0817.html: -------------------------------------------------------------------------------- 1 |
    2 |
    folds
    3 |
    folds
    4 | 5 |
    won't fold
    6 |
    7 | -------------------------------------------------------------------------------- /issues/0823.html: -------------------------------------------------------------------------------- 1 |
    2 | 9 |
    10 | -------------------------------------------------------------------------------- /issues/0824.js: -------------------------------------------------------------------------------- 1 | const Button = styled.button` 2 | border-radius: 3px; 3 | padding: 0.25em 1em; 4 | margin: 0 1em; 5 | background: transparent; 6 | color: palevioletred; 7 | border: 2px solid palevioletred; 8 | `; 9 | -------------------------------------------------------------------------------- /issues/0827.js: -------------------------------------------------------------------------------- 1 | function* generator() {} 2 | -------------------------------------------------------------------------------- /issues/0830.jsx: -------------------------------------------------------------------------------- 1 | function f() { 2 | return true 3 | && 4 | || ; 5 | } 6 | -------------------------------------------------------------------------------- /issues/0831.js: -------------------------------------------------------------------------------- 1 | axios.get('https://some-url') 2 | .then(JSON.parse) 3 | .then(console.log) 4 | .catch(console.error); 5 | 6 | // a promise returned from a function 7 | const someFunc = () => { 8 | return somePromise() 9 | .then() 10 | .catch() 11 | } 12 | 13 | // implicit return 14 | const someFunc = () => 15 | somePromise() 16 | .then() // no indent 17 | .catch() // no indent 18 | } 19 | -------------------------------------------------------------------------------- /issues/0839.html: -------------------------------------------------------------------------------- 1 |
    2 | 5 |
    6 | -------------------------------------------------------------------------------- /issues/0840.twig: -------------------------------------------------------------------------------- 1 |
      2 | {% for user in users %} 3 |
    • {{ user.username|e }}
    • 4 | {% else %} 5 |
    • no user found
    • 6 | {% endfor %} 7 |
    8 | -------------------------------------------------------------------------------- /issues/0855.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | interface Props { 4 | name: string 5 | } 6 | 7 | class MyThing extends React.Component { 8 | render() { 9 | return hi; 10 | } 11 | } 12 | 13 | export default MyThing as React.ComponentClass; 14 | -------------------------------------------------------------------------------- /issues/0856.razor: -------------------------------------------------------------------------------- 1 |
    2 | @model IEnumerable 3 | 4 | @a('foo, '\b', "dwdd") 5 | 6 |
    7 | this is a test. 8 |
    9 | 10 |
    11 | -------------------------------------------------------------------------------- /issues/0857.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /issues/0864.html: -------------------------------------------------------------------------------- 1 | {# -*- engine: jinja2 -*- #} 2 | {% block title %}{% endblock %} 3 | 8 | -------------------------------------------------------------------------------- /issues/0866.js: -------------------------------------------------------------------------------- 1 | import gql from 'graphql-tag'; 2 | 3 | const query = gql` 4 | { 5 | user(id: 5) { 6 | firstName 7 | lastName 8 | } 9 | } 10 | ` 11 | 12 | new Vue({ 13 | 14 | el: '#toto', 15 | 16 | template: ` 17 |
    18 | titi 19 | 20 | toto 21 | 24 |
    25 | toto 26 |
    27 |
    28 | ` 29 | 30 | }); 31 | -------------------------------------------------------------------------------- /issues/0868.soy: -------------------------------------------------------------------------------- 1 |
    2 | {namespace foo.bar 3 | requirecss="styles"} 4 |
    -------------------------------------------------------------------------------- /issues/0870.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | class Confirm extends Component { 3 | render() { 4 | const project = this.props.project; 5 | return ( 6 |
    7 |
    8 | {project.foo && ( 9 |
    Foo
    10 | )} 11 | {project.bar && ( 12 |

    Bar

    13 | )} 14 |
    15 |
    16 | ); 17 | } 18 | } 19 | export default Confirm; 20 | -------------------------------------------------------------------------------- /issues/0872.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | const Front = props => { 4 | return
    5 | hello 6 |
    ; 7 | }; 8 | -------------------------------------------------------------------------------- /issues/0876.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Exo'; 3 | src: 4 | url('titi'), 5 | url('toto'); 6 | font-weight: 700; 7 | } 8 | -------------------------------------------------------------------------------- /issues/0877.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | class Confirm extends Component { 3 | render() { 4 | const project = this.props.project; 5 | return ( 6 | ( 7 | 8 | 9 | 10 | )} /> 11 | ) 12 | } 13 | } 14 | 15 | import React, {Component} from 'react'; 16 | class Confirm extends Component { 17 | render() { 18 | const project = this.props.project; 19 | return ( 20 | ( 24 | ) 25 | } 26 | /> 27 | ) 28 | } 29 | }; 30 | 31 | class Test extends Component { 32 | render() { 33 | return ( 34 | 35 | 36 | ( 40 | 41 | 42 | 43 | )} /> 44 | ( 47 | 48 | 49 | 50 | )} /> 51 | 52 | 53 | ) 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /issues/0880.jsx: -------------------------------------------------------------------------------- 1 | const Demo = () => ( 2 | 7 | } 8 | > 9 | 10 | ); 11 | -------------------------------------------------------------------------------- /issues/0882.jsx: -------------------------------------------------------------------------------- 1 | import React, {Component} from 'react'; 2 | class Confirm extends Component { 3 | render() { 4 | const project = this.props.project; 5 | return ( 6 | 10 | text 11 | 12 | } 13 | /> 14 |
    15 | 16 | 19 |
    20 | ) 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /issues/0883.erb: -------------------------------------------------------------------------------- 1 |
    2 | <% 3 | content_for :title, t('moderation_queue.moderation_queue') 4 | content_for :h1, t('moderation_queue.moderation_queue') 5 | content_for :body_id, 'moderation_queue-index' 6 | content_for :body_classes, 'moderation_queue index' 7 | %> 8 |
    9 | 10 | <%# Link showing page number 11 | - available local variables 12 | page: a page object for "this" page 13 | url: url to this page 14 | current_page: a page object for the currently displayed page 15 | total_pages: total number of pages 16 | per_page: number of items to fetch per page 17 | remote: data-remote 18 | -%><% 19 | attrs = {} 20 | attrs['aria-disabled'] = 'true' if page.current? 21 | attrs[:rel] = 'next' if page.next? 22 | attrs[:rel] = 'prev' if page.prev? 23 | attrs[:remote] = remote 24 | -%> 25 |
  • 26 | <%= cf_link_to page, url + @doc_fragment.to_s, attrs %> 27 |
  • 28 | 29 |
    30 | <% 31 | a=x.y_for_w(1) 32 | b=css_class_x2 33 | c=3 34 | d=4 35 | %> 36 |
    37 |
    38 |
    39 |
    40 | -------------------------------------------------------------------------------- /issues/0887.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /issues/0895.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 19 | 28 | 29 | -------------------------------------------------------------------------------- /issues/0903.psp: -------------------------------------------------------------------------------- 1 |
    2 | 8 |
    9 | -------------------------------------------------------------------------------- /issues/0904.jsx: -------------------------------------------------------------------------------- 1 | render() { 2 | return ( 3 | 4 | { 6 | this.textInput = textInput; 7 | }} 8 | style={styles.textInput} 9 | placeholder="Enter a comment..." 10 | value={this.state.pendingTest} 11 | onChange={this.onPendingTestChanged} 12 | onChangeText={this.onPendingTestTextChanged} 13 | multiline={true} 14 | maxLength={1000} 15 | /> 16 | 20 | Post 21 | 22 | 23 | ) 24 | } 25 | -------------------------------------------------------------------------------- /issues/0905.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Example 6 | 7 | 8 |

    Example example example 9 |

    Example example example 10 |

    Articles

    11 |
      12 |
    • toto 13 |
    • csqc 14 | cdscsdv 15 |
    16 | 17 |

    Page one 18 |

    Page two 19 |

    Page three 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /issues/0911.js: -------------------------------------------------------------------------------- 1 | class x { 2 | constructor() { 3 | this.a = 1; 4 | call(); 5 | } 6 | foo() { 7 | this.b = 2; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /issues/0912.ftl: -------------------------------------------------------------------------------- 1 | [#include "/WEB-INF/common/header.ftl"] 2 | [#assign testVar=false] 3 | [#if object?has_content] 4 | Has content 5 | [#else] 6 | No content 7 | [/#if] 8 | -------------------------------------------------------------------------------- /issues/0913.html: -------------------------------------------------------------------------------- 1 |

    2 |

    Zero

    3 | 4 | 5 |

    One

    6 | 7 | 8 |

    Two

    9 | 10 |

    Three

    11 | 12 |

    Four

    13 |
    14 | -------------------------------------------------------------------------------- /issues/0915.twig: -------------------------------------------------------------------------------- 1 |
    2 | {{ form_start(form) }} 3 | {{ form_errors(form) }} 4 | 5 | {{ form_row(form.name) }} 6 | {{ form_row(form.dueDate) }} 7 | 8 | {{ form_row(form.submit, { 'label': 'Submit me' }) }} 9 | {{ form_end(form) }} 10 |
    11 | -------------------------------------------------------------------------------- /issues/0920.jsx: -------------------------------------------------------------------------------- 1 | function s(action) { 2 | switch(action.type) { 3 | case SUBSCRIBE: 4 | // TODO some comment here 5 | // another line here 6 | // line ending with a period. 7 | resource = action.resourceDescription.resource; 8 | return 0; 9 | case UNSUBSCRIBE: 10 | return 1; 11 | default: 12 | return 2; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /issues/0923.soy: -------------------------------------------------------------------------------- 1 |
    2 | 3 | {switch $numMarbles} 4 | {case 0} 5 | You have no marbles. 6 | {case 1, 2, 3} 7 | You have a normal number of marbles. 8 | {default} // 4 or more 9 | You have more marbles than you know what to do with. 10 | {/switch} 11 | 12 |
    13 | -------------------------------------------------------------------------------- /issues/0924.html: -------------------------------------------------------------------------------- 1 |
    2 | 11 |
    12 | -------------------------------------------------------------------------------- /issues/0925.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /issues/0926.vue: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | -------------------------------------------------------------------------------- /issues/0928.vue: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /issues/0929.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /issues/0930.twig: -------------------------------------------------------------------------------- 1 |
    2 | {% if var == true %} 3 |
    4 | -------------------------------------------------------------------------------- /issues/0936.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /issues/0938.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 15 | 16 | 21 | 22 |
    23 | -------------------------------------------------------------------------------- /issues/0939.psp: -------------------------------------------------------------------------------- 1 |
    2 | 7 |
    8 | -------------------------------------------------------------------------------- /issues/0940.twig: -------------------------------------------------------------------------------- 1 |
    2 | {{ form_widget(form.address.city, {'attr': {'class': 'form-control form-control-md'}}) }} 3 |
    4 | -------------------------------------------------------------------------------- /issues/0944.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /issues/0945.html: -------------------------------------------------------------------------------- 1 | 19 | -------------------------------------------------------------------------------- /issues/0947.html: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /issues/0949.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/0951.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /issues/0952.jsx: -------------------------------------------------------------------------------- 1 | 2 | render() { 3 | return ( 4 | <> 5 | Some text. 6 |

    A heading

    7 | More text. 8 |

    Another heading

    9 | Even more text. 10 | 11 | ); 12 | } 13 | 14 | render() { 15 | return ( 16 | 17 | Some text. 18 |

    A heading

    19 | More text. 20 |

    Another heading

    21 | Even more text. 22 |
    23 | ); 24 | } 25 | 26 | ender() { 27 | return ( 28 | // Extraneous div element :( 29 |
    30 | Some text. 31 |

    A heading

    32 | More text. 33 |

    Another heading

    34 | Even more text. 35 |
    36 | ); 37 | } 38 | 39 | render() { 40 | return [ 41 | "Some text.", 42 |

    A heading

    , 43 | "More text.", 44 |

    Another heading

    , 45 | "Even more text." 46 | ]; 47 | } 48 | -------------------------------------------------------------------------------- /issues/0954.erb: -------------------------------------------------------------------------------- 1 | 2 | <%= link_to_unless current_page.last?, raw(''), url, remote: remote, class: 'item' %> 3 | 4 | -------------------------------------------------------------------------------- /issues/0955.djhtml: -------------------------------------------------------------------------------- 1 | 2 | {% for num in range( 1, pages) %} 3 | {% if num <= 3 %} 4 |
  • {{ num }}
  • 5 | {% else %} 6 |
  • ......
  • 7 | {% endif %} 8 | {% endfor %} 9 |
    10 | -------------------------------------------------------------------------------- /issues/0956.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 22 | 23 | 24 | 25 |
    26 | hi 27 |
    28 | 29 | 32 | 33 | -------------------------------------------------------------------------------- /issues/0957.djhtml: -------------------------------------------------------------------------------- 1 | {% extends 'base.html' %} 2 | 3 | 4 | 5 | 6 | {{ var }} 7 | 8 | 9 | -------------------------------------------------------------------------------- /issues/0959.js: -------------------------------------------------------------------------------- 1 | var regexp = /I'm foo/.test("I'm foo") 2 | 3 | /I'm foo/.test("I'm foo") 4 | -------------------------------------------------------------------------------- /issues/0960.jsx: -------------------------------------------------------------------------------- 1 | render() { 2 | return ( 3 |
    4 | 5 | datalibrary 6 | 7 | 8 | 33 | 34 | 35 |
    36 | ); 37 | } 38 | -------------------------------------------------------------------------------- /issues/0961.js: -------------------------------------------------------------------------------- 1 | const a = ["I'm", "foo"]; 2 | 3 | switch (true) { 4 | case /I'm foo/.test(a.join(' ')): 5 | console.log(true); 6 | break; 7 | } 8 | -------------------------------------------------------------------------------- /issues/0970.gohtml: -------------------------------------------------------------------------------- 1 |
    2 | {{- with .Title }} 3 | {{ . }} 4 | {{ end }} 5 |
    6 | 7 |
    8 | {{ if not .Params.notoc }} 9 | 17 | 18 | {{end}} 19 |
    20 | 21 |
    22 | {{- .Title -}} 23 |
    24 | 25 |

    Upcoming Events

    26 |
      27 | {{ range where .Data.Pages.ByDate "Section" "events" }} 28 | {{ if ge .Date.Unix .Now.Unix }} 29 |
    • 30 | 31 | {{ .Type | title }} — 32 | {{ .Title }} on 33 | 34 | {{ .Date.Format "2 January at 3:04pm" }} 35 | at {{ .Params.place }} 36 |
    • 37 | {{ end }} 38 | {{ end }} 39 |
    -------------------------------------------------------------------------------- /issues/0976.twig: -------------------------------------------------------------------------------- 1 |
      2 | {#% for user in users %#} 3 |
    • {{ user.username|e }}
    • 4 | {% else %} 5 |
    • no user found
    • 6 | {% endfor %} 7 |
    8 | -------------------------------------------------------------------------------- /issues/0978.psp: -------------------------------------------------------------------------------- 1 |
    2 | True is true!

    '; 5 | else: 6 | echo '

    My grasp on reality is slipping

    '; 7 | endif; 8 | ?> 9 |
    10 | -------------------------------------------------------------------------------- /issues/0979.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | 5 |

    hellso

    6 | 7 |
    8 | 9 |
    10 | -------------------------------------------------------------------------------- /issues/0983.jsx: -------------------------------------------------------------------------------- 1 | render() { 2 | return ( 3 | 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /issues/0984.html: -------------------------------------------------------------------------------- 1 | 37 | -------------------------------------------------------------------------------- /issues/0987.eex: -------------------------------------------------------------------------------- 1 | <% 2 | # code block 3 | %> 4 | -------------------------------------------------------------------------------- /issues/0988.scala.html: -------------------------------------------------------------------------------- 1 | @(title: String, description: String = null, js: Html = Html(""), jsAsset: String = null, css: Html = Html(""), cssAsset: String = null, showEntryBtn: Boolean = true)(content: Html) 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | @title 12 | 13 | 14 | 15 | 16 | 17 | 18 | @css 19 | 20 | @if(cssAsset != null) { 21 | 22 | } 23 | 24 | 25 | 26 | 30 | 31 | 32 | 33 |
    34 | @if(showEntryBtn) { 35 | 返回主界面 36 | } 37 |
    38 | @content 39 |
    40 |
    41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 52 | 53 | @js 54 | 55 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /issues/0989.js: -------------------------------------------------------------------------------- 1 | let result = (2 > 1) ? "more" : "less"; 2 | let result = 2 > 1 ? "more" : "less"; 3 | let result = ( 2 > 1 ) "more": "less"; 4 | let result = (2 > 1.5) ? "more" : "less"; 5 | let number = (2 + 1); 6 | -------------------------------------------------------------------------------- /issues/0992.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import { Menu } from 'semantic-ui-react'; 4 | 5 | export default function Example() { 6 | return ( 7 | 8 | 9 | ← cursor here 10 | 11 | 12 | ); 13 | } 14 | -------------------------------------------------------------------------------- /issues/0995.blade.php: -------------------------------------------------------------------------------- 1 | @yield('content') 2 | @lang('app.name') 3 | 4 | @guest 5 | @choice('foo', 2) 6 | 7 | 8 | @endguest 9 | -------------------------------------------------------------------------------- /issues/0998.html: -------------------------------------------------------------------------------- 1 | 9 | -------------------------------------------------------------------------------- /issues/1000.html: -------------------------------------------------------------------------------- 1 |
    2 |

    link 1 3 |

    link 2 4 |

    5 | -------------------------------------------------------------------------------- /issues/1002.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @field([ 3 | 'label' => 'Foo', 4 | 'values' => ['bar'] 5 | ]) 6 |
    7 | 8 |
    9 | @section('content') 10 | Foo 11 | @endsection 12 |
    13 | 14 |
    15 | @sectionInner(['name' => 'Foo']) 16 |

    foo

    17 | @endsectionInner 18 |
    19 | -------------------------------------------------------------------------------- /issues/1003.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /issues/1006.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/1009.html: -------------------------------------------------------------------------------- 1 | 2 |
    text
    text
    3 | 4 | -------------------------------------------------------------------------------- /issues/1013.html: -------------------------------------------------------------------------------- 1 | 3 | 8 | 10 | 16 | -------------------------------------------------------------------------------- /issues/1014.html: -------------------------------------------------------------------------------- 1 | 2 | 14 | -------------------------------------------------------------------------------- /issues/1016.js: -------------------------------------------------------------------------------- 1 | type T = {| 2 | x: number, 3 | titi: y, 4 | 5 | |}; 6 | 7 | var toto = { 8 | x, 9 | b 10 | }; 11 | -------------------------------------------------------------------------------- /issues/1020.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /issues/1021.js: -------------------------------------------------------------------------------- 1 | /* test; */ 2 | -------------------------------------------------------------------------------- /issues/1022.jsx: -------------------------------------------------------------------------------- 1 | function hello() { 2 | 3 | return ( 4 | { 7 | this.inputFile = component; 8 | }} 9 | /> 10 | ); 11 | } 12 | -------------------------------------------------------------------------------- /issues/1023.vue: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /issues/1024.psp: -------------------------------------------------------------------------------- 1 |
    2 | query("SELECT post.id, title, " . self::$query_vote . 6 | ", question, date, " . $this->vote_query . 7 | " FROM questions post WHERE ? in (" . 8 | self::$tags_query . 9 | " = post.id)", $tag); 10 | foreach ($questions as &$question) { 11 | $question['tags'] = $this->get_tags($question['id']); 12 | } 13 | return $questions; 14 | } 15 | ?> 16 |
    17 | -------------------------------------------------------------------------------- /issues/1027.jsx: -------------------------------------------------------------------------------- 1 | function hello() { 2 | 3 | return ( 4 |
    5 | {active ? ( 6 |
    7 | ) : ( 8 | 9 | )} 10 |
    11 | ) 12 | 13 | } 14 | -------------------------------------------------------------------------------- /issues/1029.blade.php: -------------------------------------------------------------------------------- 1 | @switch($i) 2 | 3 | @case(1) 4 | First case... 5 | @break 6 | 7 | @case(2) 8 | Second case... 9 | @break 10 | 11 | @default 12 | Default case... 13 | 14 | @endswitch 15 | -------------------------------------------------------------------------------- /issues/1032.html: -------------------------------------------------------------------------------- 1 |
    2 | 7 |
    8 | -------------------------------------------------------------------------------- /issues/1034.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @row 3 | @col 4 | column 1 5 | @endcol 6 | @col 7 | column 2 8 | @endcol 9 | @endrow 10 |
    11 | -------------------------------------------------------------------------------- /issues/1037.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /issues/1042.jsx: -------------------------------------------------------------------------------- 1 | class NS { 2 | render() { 3 | return ( 4 |
    5 | {loop.map(item => { 6 | return ( 7 | 10 | {item.name} 11 | 12 | ); 13 | })} 14 |
    15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /issues/1046.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |
    4 | -------------------------------------------------------------------------------- /issues/1047.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render partial: 'some_partial', 3 | locals: { 4 | icon: nil, 5 | errors: [], 6 | title: 'Title' 7 | } 8 | %> 9 |
    10 | -------------------------------------------------------------------------------- /issues/1052.js: -------------------------------------------------------------------------------- 1 | import { html, render } from 'lit-html'; 2 | 3 | const myTemplate = (el) => html` 4 | 14 |
    15 |

    My Web Component

    16 |
    17 |
    18 |
    19 | ` 20 | 21 | export class MyComponent extends HTMLElement { 22 | constructor() { 23 | super(); 24 | this.root = this.attachShadow({mode: 'open'}); 25 | this.color = "blue"; 26 | this.size = 12 27 | this.titleSize = 1.2; 28 | this.render(); 29 | } 30 | 31 | render() { 32 | render(myTemplate(this), this.root) 33 | } 34 | } 35 | customElements.define('my-component', MyComponent) 36 | -------------------------------------------------------------------------------- /issues/1053.html: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /issues/1057-angular.component.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 | 5 | 6 | 9 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 47 | 48 | 49 | 52 | 55 | 56 | 57 | 58 | 59 | 62 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 75 | 78 | 79 | 80 | 90 | 91 | 92 |
    7 | {{ 'general.general_info' | translate }} 8 | 10 | 15 | {{ 'general.edit' | translate }} 16 | 17 | 18 |
    25 | {{ 'general.source' | translate }} 26 | 28 | 29 | {{ 'general.upload' | translate }} 30 | 31 | 32 | {{ 'general.email' | translate }} 33 | 34 | 35 | Scanner 36 | 37 | 38 | Zoomit 39 | 40 | 41 | Codabox 42 | 43 | 44 | Basware 45 | 46 |
    50 | {{ 'general.upload_date' | translate }} 51 | 53 | {{ document.getDateUpload() }} 54 |
    60 | {{ 'journal.journal' | translate }} 61 | 63 | {{ document.journal.name }} 64 |
    73 | {{ 'modal.customer' | translate }} 74 | 76 | {{ document.invoice.third_name }} 77 |
    81 |
    82 | 88 |
    89 |
    93 |
    94 | -------------------------------------------------------------------------------- /issues/1072.js: -------------------------------------------------------------------------------- 1 | class Class { 2 | method() { 3 | // GOOD 4 | nodeSel 5 | .enter() 6 | .append('circle') 7 | const nodeSel = svg.selectAll('circle') 8 | // BAD 9 | nodeSel 10 | .enter() 11 | .append('circle') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /issues/1073.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 1 4 | 5 | 6 | -------------------------------------------------------------------------------- /issues/1080.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /issues/1085.mako: -------------------------------------------------------------------------------- 1 |
    2 | <% 3 | dict = { 4 | 'value': { 5 | 'subvalue': 123 6 | } 7 | } 8 | 9 | try: 10 | print('123') 11 | except: 12 | print('error') 13 | %> 14 |
    15 | -------------------------------------------------------------------------------- /issues/1086.html: -------------------------------------------------------------------------------- 1 |
    2 | 13 |
    14 | -------------------------------------------------------------------------------- /issues/1089.psp: -------------------------------------------------------------------------------- 1 | 3 | The number is 2 | // foo bar 3 | // baz {{ this should 4 | // still be treated as 5 | // a comment }} 6 | 7 | -------------------------------------------------------------------------------- /issues/1092.ee: -------------------------------------------------------------------------------- 1 | {!-- This is a comment. --} 2 | {layout="site/_html-layout" title="News"} 3 | 4 | 5 | {!-- Note the nested braces here. --} 6 |
    {entry_date {my_date_formatting}}
    7 | 8 | 9 | {!-- Iterate over a list of entries and do some tests. --} 10 | {exp:channel:entries channel="news"} 11 |

    {title}

    12 | 13 | {if total_results == 1} 14 | {body} 15 | {layout:set name="title"}News | {title}{/layout:set} 16 | {if:ifelse x == 100} 17 |
    something else
    18 | {if:else} 19 | {summary} 20 | {/if} 21 | 22 | {/exp:channel:entries} 23 | 24 | 25 | {!-- An expression that has its attributes wrapped. --} 26 |
      27 | {exp:global:something 28 | attr="something" 29 | this="that" 30 | another="thing" 31 | } 32 |
    • {a_value}
    • 33 | {/exp:global:something} 34 |
    35 | -------------------------------------------------------------------------------- /issues/1093.html: -------------------------------------------------------------------------------- 1 | 12 | -------------------------------------------------------------------------------- /issues/1096.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/1097.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | class App extends React.Component { 4 | 5 | render() { 6 | return
    7 | 8 | 9 | 11 | 18 | }> 19 | 20 | 21 | 22 |
    ; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /issues/1101.razor: -------------------------------------------------------------------------------- 1 |
    2 | @{ 3 | var foo = 1; 4 | 5 | if (foo == 1) { 6 | foo = 2; 7 | } 8 | } 9 |
    10 | -------------------------------------------------------------------------------- /issues/1103.html: -------------------------------------------------------------------------------- 1 |
    2 | -------------------------------------------------------------------------------- /issues/1105.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /issues/1108.vue.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /issues/1109.blade.php: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /issues/1116.blade.php: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /issues/1119.djhtml: -------------------------------------------------------------------------------- 1 |
    2 | {#% graph %#} 3 |
    4 | -------------------------------------------------------------------------------- /issues/1128.js: -------------------------------------------------------------------------------- 1 | const myStyle = css` 2 | font-size: ${x}px; 3 | max-width: 560px; 4 | margin: 0 auto; 5 | `; 6 | 7 | const myStyle = html` 8 |
    9 | coucou 10 |
    11 | `; 12 | -------------------------------------------------------------------------------- /issues/1132.epl: -------------------------------------------------------------------------------- 1 |
    2 | %= javascript begin 3 | $(function() { 4 | $('#select-year select').change(function() { 5 | $('#select-year').attr('action', '/' + this.value ); 6 | $('#select-year').submit(); 7 | }); 8 | }); 9 | % end 10 |
    11 | -------------------------------------------------------------------------------- /issues/1145.djhtml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | xsx 4 | cd 5 | --- 6 | 7 |
    8 |
    9 | 10 | {% include docs_contents_mobile.html %} 11 | 12 |
    13 |
    14 |

    {{ page.title }}

    15 | {{ content }} 16 | {% include section_nav.html %} 17 |
    18 |
    19 | 20 | {% include docs_contents.html %} 21 | 22 |
    23 | 24 |
    25 |
    26 | -------------------------------------------------------------------------------- /issues/1147.jsx: -------------------------------------------------------------------------------- 1 | import * as React from 'react'; 2 | 3 | export default class Counter extends React.Component { 4 | render () { 5 | return ( 6 |
    7 |

    {this.state.count}

    8 | 9 | 10 |
    11 | ); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /issues/1148.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { observable } from 'mobx'; 3 | import _ from 'lodash'; 4 | 5 | const state = observable({ 6 | tasks: [], 7 | existsActiveTask: function() { 8 | const task = _(this.tasks).last(); 9 | if (!task) return false; 10 | 11 | return !!task.finishedAt; 12 | }, 13 | startTask: function(description) { 14 | if (_(tasks).last) 15 | tasks.push({description}); 16 | } 17 | }) 18 | 19 | function App() { 20 | return ( 21 |
    22 |
    23 |

    24 | Edit src/App.js and save to reload. 25 |

    26 | 31 | Learn React 32 | 33 |
    34 |
    35 | ); 36 | } 37 | 38 | export default App; 39 | -------------------------------------------------------------------------------- /issues/1150.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /issues/1151.html: -------------------------------------------------------------------------------- 1 | xqsxs 2 | xq 3 | sx 4 | qsxxqqs 5 | x 6 | sx 7 | q 8 | sx 9 | 10 | xs 13 | 14 | xssx 15 | -------------------------------------------------------------------------------- /issues/1158.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /issues/1160.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /issues/1164.asp: -------------------------------------------------------------------------------- 1 | <% 2 | set objBrowserCapabilities = Server.CreateObject("MSWC.BrowserType") 3 | bCookiesSupported = objBrowserCapabilities.cookies 4 | session("sGotoPage") = "" 5 | '' vsdf 6 | ''if bDebug then 7 | '' response.write bCookiesSupported 8 | '' response.write Session.SessionID 9 | '' response.end 10 | ''end if 11 | %> 12 | <% ''^^^ End Startup Code %> 13 | 14 | 15 | 16 |
    17 | Test 18 |
    19 | 20 | 21 | -------------------------------------------------------------------------------- /issues/1165.vue: -------------------------------------------------------------------------------- 1 | 5 | 6 | 25 | 26 | 33 | -------------------------------------------------------------------------------- /issues/1168.php: -------------------------------------------------------------------------------- 1 | 2 | async function handleRun(ev) { 3 | ev.preventDefault(); 4 | let policy = editor.getValue(); 5 | let res = {}; 6 | 7 | 8 | } 9 | 10 | -------------------------------------------------------------------------------- /issues/1171.djhtml: -------------------------------------------------------------------------------- 1 |
      2 | # for item in seq 3 |
    • {{ item }}
    • 4 | # endfor 5 |
    6 | instead of 7 | 8 |
      9 | {% for item in seq %} 10 |
    • {{ item }}
    • 11 | {% endfor %} 12 |
    13 | -------------------------------------------------------------------------------- /issues/1173.php: -------------------------------------------------------------------------------- 1 | 11 | -------------------------------------------------------------------------------- /issues/1176.jsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | 3 | function Component() { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /issues/1178.html: -------------------------------------------------------------------------------- 1 |
    2 | hello 3 |
    4 | 5 | { 6 | "en": { 7 | "hello": "hello world!" 8 | }, 9 | "ja": { 10 | "hello": "こんにちは、世界!" 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /issues/1188.eex: -------------------------------------------------------------------------------- 1 |
    2 | <%= form_for @changeset, "#", 3 | id: "post-form", 4 | phx_target: @myself, 5 | phx_change: "validate", 6 | phx_submit: "save" do %> 7 | 8 | <%= textarea f, :body %> 9 | <%= error_tag f, :body %> 10 | 11 | <%= submit "Save", phx_disable_with: "Saving..." %> 12 | <% end %> 13 |
    14 | -------------------------------------------------------------------------------- /issues/1193.jsx: -------------------------------------------------------------------------------- 1 | function hello1() { 2 | 3 | return ( 4 | 10 | 11 | ); 12 | 13 | }; 14 | 15 | function hello2() { 16 | 17 | return ( 18 | 24 | 25 | 26 | ); 27 | 28 | }; 29 | -------------------------------------------------------------------------------- /issues/1198.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%== javascript_tag 'app' %> 3 |
    4 | -------------------------------------------------------------------------------- /issues/1209.cshtml: -------------------------------------------------------------------------------- 1 |
    2 | @if (true) 3 | { 4 |

    welcome

    5 |

    hello

    6 | } 7 | else 8 | { 9 | 10 | } 11 |
    12 | -------------------------------------------------------------------------------- /issues/1212.psp: -------------------------------------------------------------------------------- 1 |
    2 | 'Add', 'url' => '/add/', 'rules' => array() ), 5 | array( 'name' => 'List', 'url' => '/list/', 'rules' => array() ), 6 | array( 'name' => 'Sections', 'url' => '/section/', 'rules' => array() ), 7 | ); 8 | ?> 9 |
    10 | -------------------------------------------------------------------------------- /issues/1215.heex: -------------------------------------------------------------------------------- 1 |
    2 | test 3 |
    4 | <.two_column> 5 | <:title> 6 | Pipelines 7 | 8 | <:left_content> 9 | <.card_with_title> 10 | <:title> 11 | Listing Pipelines 12 | 13 | <:content> 14 | <.pipelines_table pipelines={@pipelines} /> 15 | 16 | 17 | 18 | <:right_content> 19 | <.card_with_title> 20 | <:title> 21 | Filters 22 | 23 | <:content> 24 | <.form let={f} for={@filters_changeset} phx-change="filter-pipelines"> 25 | <.input_label label="Client Name"> 26 | <.text_input form={f} name={:client_name} /> 27 | 28 | <.input_label label="Pipeline Type"> 29 | <.text input form={f} name={:pipeline_type} /> 30 | 31 | 32 | 33 | 34 | 35 | 36 |
    37 | ok 38 |
    39 | -------------------------------------------------------------------------------- /issues/1221.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 |

    nooo I don't want to indent this

    4 |
    5 | -------------------------------------------------------------------------------- /issues/1226.djhtml: -------------------------------------------------------------------------------- 1 |
    2 | {% set foo %} 3 | bar 4 | {% endset %} 5 |
    6 | -------------------------------------------------------------------------------- /issues/1228.html: -------------------------------------------------------------------------------- 1 | 24 | -------------------------------------------------------------------------------- /issues/1229.html.erb: -------------------------------------------------------------------------------- 1 | bar="baz" /> 2 | 3 | bar="baz" /> 4 | -------------------------------------------------------------------------------- /issues/1230.twig: -------------------------------------------------------------------------------- 1 | 13 |
    14 | {% if condition %} 15 | hello 16 | {% endif %} 17 |
    18 | -------------------------------------------------------------------------------- /issues/1233.svelte: -------------------------------------------------------------------------------- 1 |
    2 | 8 |
    9 | -------------------------------------------------------------------------------- /issues/1238.css.html: -------------------------------------------------------------------------------- 1 | 150 | -------------------------------------------------------------------------------- /issues/1239.perl.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | YEAH 4 | 5 | OKAY 6 | 7 |
    8 | -------------------------------------------------------------------------------- /issues/1243.vue: -------------------------------------------------------------------------------- 1 | 78 | 79 | 162 | 163 | 195 | -------------------------------------------------------------------------------- /issues/1245.css.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /issues/1246.anki: -------------------------------------------------------------------------------- 1 | 2 | What is the capital of {{Country}}? 3 | 6 |
    7 | 8 | The capital is {{Capital}} 9 | 10 | 11 |
    12 | {{#Region}} 13 | And it is in {{Region}} 14 | {{/Region}} 15 |
    16 | 17 | {{^Region}} 18 | {{Capital}} is in no region :/ 19 | {{/Region}} 20 | 21 | 22 | {{tts en_US speed=0.8 voices=Apple_Otoya:Example Word}} 23 | 24 | {{tts en_US:cloze-only:Example Word}} 25 | 26 | 27 | {{cloze:Example Word}} 28 | {{#c1}} 29 | Hint for cloze deletion card c1 30 | {{/c1}} 31 | {{#c2}} 32 | Hint for cloze deletion card c2 33 | {{/c2}} 34 | 35 | 36 |

    {{Tags}} {{Type}} {{Deck}} {{Subdeck}} {{Card}} are always set.

    37 |

    {{FrontSide}} is only set in the Back template (answer), but not in the Front template (question)

    38 | It will render the Front side of the card. 39 | 40 | 41 | {{hint:My Field}} 42 | 43 | 45 | {{type:My Field}} 46 | 47 | {{type:cloze:MyField}} 48 | 49 | 50 | check in dictionary 51 | 52 | 53 | check in dictionary 54 | 55 | 56 | 57 | 58 | 59 | [sound:something.mp3] 60 | 61 | [latex]$\displaystyle\sum_0^\infty\frac1{n^2}=\frac{\pi^2}4$[/latex] 62 | but also inline [$]2+3=5[/$] equations, or [$$]centered equations[/$$]. 63 | 64 | Inline \(2+3=5\) euqations, or \[centered equations\]. 65 | -------------------------------------------------------------------------------- /issues/1247.astro: -------------------------------------------------------------------------------- 1 | --- 2 | import Button from './Button.astro'; 3 | --- 4 |

    {title}

    5 |
    6 |
    10 |
    11 | 12 |
      13 | {myFavoritePokemon.map((data) =>
    • {data.name}
    • )} 14 |
    15 | 16 |

    17 |

    18 | -------------------------------------------------------------------------------- /issues/1252.js: -------------------------------------------------------------------------------- 1 | function getHTML(div){ 2 | const html = `
    ${div}
    `; 3 | return html; 4 | } 5 | -------------------------------------------------------------------------------- /issues/1255.jsx: -------------------------------------------------------------------------------- 1 | function x() { 2 | const good = ( 3 |
    6 | wat 7 |
    8 | ); 9 | const bad = ( 10 | 14 | ); 15 | const badish = ( 16 | 28 | ); 29 | } 30 | -------------------------------------------------------------------------------- /issues/1256.ts: -------------------------------------------------------------------------------- 1 | function hello() { 2 | // This is a comment with a dot at the end. 3 | let var = "wrong indentation"; 4 | 5 | // This is a comment without a dot at the end 6 | let var = "correct indentation"; 7 | } 8 | -------------------------------------------------------------------------------- /issues/1257.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | hello world 5 | 6 | 7 | 8 | lorem 9 | 10 | 11 | -------------------------------------------------------------------------------- /issues/1259.ts: -------------------------------------------------------------------------------- 1 | And(/^no template should be selected/, () => context.composer.should("not.exist")); 2 | -------------------------------------------------------------------------------- /issues/1262.antlers.html: -------------------------------------------------------------------------------- 1 |
    2 | {{ if meta_title }} 3 | {{ meta_title }} 4 | {{ elseif title }} 5 | {{ title }} 6 | {{ else }} 7 | {{ site:name }} 8 | {{ /if }} 9 | 10 | {{ size = 'lg' }} 11 | 12 |
    21 | 22 | {{ perfectenschlag }} 23 | {{squished}} 24 | {{ some_variabler | upper }} 25 | {{ nav :from="segment_1" }} 26 | {{ collection:blog limit="{entry_limit ?? 10}" }} 27 | {{ 28 | testimonials 29 | limit="5" 30 | order="username" 31 | }} 32 | {{playSad_Tromb0ne }} 33 | 34 | 35 |
    36 | 37 | {{ if neighbor == "Kramer" }} 38 |

    These pretzels are making me thirsty!

    39 | {{ elseif neighbor == "Newman" }} 40 |
    41 |

    Hello...Newman.

    42 |
    43 | {{ else }} 44 | 45 | {{ /if }} 46 | -------------------------------------------------------------------------------- /issues/1265.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | @include('a', [ 3 | 'key1' => someFunc('value1'), 4 | 'key2' => 'value2', 5 | ]) 6 |
    7 | -------------------------------------------------------------------------------- /issues/1268.psp: -------------------------------------------------------------------------------- 1 |
    2 | 0, 4 | 'b' => 1, 5 | 'c' => 2 6 | ]; 7 | 8 | $y = array( 9 | 'a' => 0, 10 | 'b' => 1, 11 | 'c' => 2 12 | ); 13 | 14 | function_call( 15 | $arg0, 16 | $arg1, 17 | $arg2 18 | ); 19 | ?> 20 |
    21 | -------------------------------------------------------------------------------- /issues/1275.djhtml: -------------------------------------------------------------------------------- 1 | test 2 | {% block js %} 3 | 6 | {% endblock %} 7 |
    8 | 11 |
    12 | -------------------------------------------------------------------------------- /issues/1279.asp: -------------------------------------------------------------------------------- 1 | <% 2 | set objBrowserCapabilities = Server.CreateObject("MSWC.BrowserType") 3 | bCookiesSupported = objBrowserCapabilities.cookies 4 | session("sGotoPage") = "" 5 | ' vsdf 6 | 'if bDebug then 7 | ' response.write bCookiesSupported 8 | ' response.write Session.SessionID 9 | ' response.end 10 | 'end if 11 | %> 12 | <% '^^^ End Startup Code %> 13 | 14 | 15 | 16 |
    17 | Test 18 |
    19 | 20 | 21 | -------------------------------------------------------------------------------- /issues/1286.blade.php: -------------------------------------------------------------------------------- 1 | @php 2 | $isActive = false; 3 | $hasError = true; 4 | @endphp 5 | 6 |
    7 | {{ $attributes->whereDoesntStartWith('wire:model') }} 8 |
    9 | 10 | $isActive, 13 | 'text-gray-500' => ! $isActive, 14 | 'bg-red' => $hasError, 15 | ])> 16 | 17 | 18 | -------------------------------------------------------------------------------- /issues/1294.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Test 6 | 7 | 8 |

    Hello, World!

    9 |

    Paragraph

    10 | 11 | 12 | -------------------------------------------------------------------------------- /issues/1296.erb: -------------------------------------------------------------------------------- 1 |
    2 | <%= render_to_string partial: 'some_partial', 3 | locals: { 4 | icon: nil, 5 | errors: [], 6 | title: 'Title' 7 | } %> 8 | 9 | 10 | <%= render partial: 'some_partial', 11 | locals: { 12 | icon: nil, 13 | errors: [], 14 | title: 'Title' 15 | } %> 16 |
    17 | -------------------------------------------------------------------------------- /issues/1299.jsx: -------------------------------------------------------------------------------- 1 | export function Component(): JSX.Element { 2 | return ( 3 |

    4 | You can disable this mechanism with 5 | Chrome Extension , 6 | but you do this on your own risk. 7 |

    8 | ); 9 | } 10 | 11 | function hello() { 12 | return ( 13 | { 16 | this.inputFile = component; 17 | }} 18 | /> 19 | ); 20 | } 21 | 22 | import React, {Component} from 'react'; 23 | class Confirm extends Component { 24 | render() { 25 | const project = this.props.project; 26 | return ( 27 | ( 28 | 29 | 30 | 31 | )} /> 32 | ) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /issues/1300.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 | @lang('consumption.this_month') 4 | 5 | Hello, {!! $name !!}. 6 | 7 | {{ isset($name) ? $name : 'Default' }} 8 | 9 | @{{ This will not be processed by Blade }} 10 | 11 | @component 12 | toto 13 | @endcomponent 14 | 15 | {{-- This comment will not be in the rendered HTML --}} 16 | 17 | @section('title', 'Page Title') 18 | 19 | @if (count($records) === 1) 20 | I have one record! 21 | @elseif (count($records) > 1) 22 | I have multiple records! 23 | @else 24 | I don't have any records! 25 | @endif 26 | 27 | @unless (Auth::check()) 28 | You are not signed in. 29 | @endunless 30 | 31 | Anothter example: 32 | 33 | @section('box-content') 34 | 35 |

    Item

    36 | {!!Form::open( ['route' => ['menu.store'] , 'id' => 'form'])!!} 37 | 38 | @section('list.item.content') 39 |

    This is an item of type {{$item->type}}

    40 | @overwrite 41 | 42 |
    43 | @section('sidebar') 44 | This is themaster sidebar. 45 | @show 46 |
    47 | @yield('content') 48 |
    49 |
    50 | 51 | @show 52 | 53 |
    54 | 55 | @choice('foo', 2) 56 | -------------------------------------------------------------------------------- /issues/1303.ftl: -------------------------------------------------------------------------------- 1 |
    Name 2 | [#list animals as animal] 3 | 4 | [#if animal.size == "large"]test1[/#if] 5 | ${animal.name} 6 | [#if animal.size == "large"]test2[/#if] 7 | ${animal.price} Euros 8 | 9 | [/#list] 10 |
    11 | -------------------------------------------------------------------------------- /issues/1308.jsx: -------------------------------------------------------------------------------- 1 | function App() { 2 | return ( 3 |
    4 |
    5 |
    6 | ); 7 | } 8 | 9 | function App() { 10 | return ( 11 |
    12 |
    13 |
    14 | ); 15 | } 16 | -------------------------------------------------------------------------------- /issues/1310.jsx: -------------------------------------------------------------------------------- 1 | function App() { 2 | return ( 3 | <> 4 | 5 | 6 | 7 |
    8 |
    9 | 10 | ); 11 | }; 12 | 13 | const Translations = () => { 14 | const { t } = useTranslation("coi-platform-translations", { 15 | keyPrefix: keyPrefixes.main, 16 | }); 17 | return ( 18 | <> 19 | 20 | {t("info_title")} 21 | {t("info_description")} 22 | 23 | 24 | 25 | ); 26 | }; 27 | -------------------------------------------------------------------------------- /issues/1311.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @if ($feedbackform && false) 3 | {{$feedbackform}} 4 | @endif 5 | 6 | -------------------------------------------------------------------------------- /issues/1313.jsx: -------------------------------------------------------------------------------- 1 | export default function TreeView({ data }: TreeProps) { 2 | return ( 3 | ( 7 | 8 | {hasChildren && ( 9 | <> 10 | 14 | {node.label} 15 | 16 | )} 17 | {!hasChildren && {node.label}} 18 | 19 | )} 20 | /> 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /issues/1315.blade.php: -------------------------------------------------------------------------------- 1 | 2 | @if ($feedbackform && false) 3 | {{$feedbackform}} 4 | 5 | {{-- 6 | test ici 7 | --}} 8 | 9 | @endif 10 | 11 | -------------------------------------------------------------------------------- /issues/998.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /issues/XXX.jsx: -------------------------------------------------------------------------------- 1 | class Confirm extends Component { 2 | render() { 3 | return ( 4 | 5 | ( 8 | 9 | 10 | )} /> 11 | 12 | ) 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /issues/test.component.html: -------------------------------------------------------------------------------- 1 | 7 | {{ 'general.edit' | translate }} 8 | 9 | 10 |
      11 | 12 | 13 | 14 | 15 |
    16 | -------------------------------------------------------------------------------- /issues/test.jsx: -------------------------------------------------------------------------------- 1 | export function Component(): JSX.Element { 2 | return ( 3 |

    4 | You can disable this mechanism with 5 | Chrome Extension , 6 | but you do this on your own risk. 7 |

    8 | ); 9 | } 10 | 11 | function hello() { 12 | return ( 13 | { 16 | this.inputFile = component; 17 | }} 18 | /> 19 | ); 20 | } 21 | -------------------------------------------------------------------------------- /issues/test.psp: -------------------------------------------------------------------------------- 1 |
      2 | class="2" /> 3 |
    4 | -------------------------------------------------------------------------------- /issues/test.ts: -------------------------------------------------------------------------------- 1 | function greeter(person) { 2 | // return "Hello, " + person; 3 | } 4 | 5 | let user = "Jane User"; 6 | 7 | document.body.textContent = greeter(user); 8 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -x /Applications/Emacs.app/Contents/MacOS/Emacs ]; 4 | then 5 | EMACS=/Applications/Emacs.app/Contents/MacOS/Emacs 6 | elif [ -x /Applications/Aquamacs.app/Contents/MacOS/Aquamacs ]; 7 | then 8 | EMACS=/Applications/Aquamacs.app/Contents/MacOS/Aquamacs 9 | else 10 | EMACS=emacs 11 | fi 12 | 13 | $EMACS -batch -no-site-file -Q --eval '(setq standard-indent 2)' --eval '(setq-default indent-tabs-mode nil)' --eval '(load-file "web-mode.el")' --eval '(web-mode)' -f web-mode-test 2> /dev/null 14 | -------------------------------------------------------------------------------- /tests/test.blade.php: -------------------------------------------------------------------------------- 1 |
    2 | 3 | @lang('consumption.this_month') 4 | 5 | Hello, {!! $name !!}. 6 | 7 | {{ isset($name) ? $name : 'Default' }} 8 | 9 | @{{ This will not be processed by Blade }} 10 | 11 | @component 12 | toto 13 | @endcomponent 14 | 15 | {{-- This comment will not be in the rendered HTML --}} 16 | 17 | @section('title', 'Page Title') 18 | 19 | @if (count($records) === 1) 20 | I have one record! 21 | @elseif (count($records) > 1) 22 | I have multiple records! 23 | @else 24 | I don't have any records! 25 | @endif 26 | 27 | @unless (Auth::check()) 28 | You are not signed in. 29 | @endunless 30 | 31 | Anothter example: 32 | 33 | @section('box-content') 34 | 35 |

    Item

    36 | {!!Form::open( ['route' => ['menu.store'] , 'id' => 'form'])!!} 37 | 38 | @section('list.item.content') 39 |

    This is an item of type {{$item->type}}

    40 | @overwrite 41 | 42 |
    43 | @section('sidebar') 44 | This is themaster sidebar. 45 | @show 46 |
    47 | @yield('content') 48 |
    49 |
    50 | 51 | @show 52 | 53 |
    54 | 55 | @choice('foo', 2) 56 | -------------------------------------------------------------------------------- /tests/test.chtml: -------------------------------------------------------------------------------- 1 |
    2 | {{#foo 3 | attribute=bar 4 | otherAttribute=baz}} 5 | But for inline tags, ctemplates indents it like so: 6 | 7 | {{foo 8 | attribute=bar 9 | otherAttribute=baz}} 10 |
    11 | 12 |
    13 | {{#if foo}} 14 | {{#each bar}} 15 | foo 16 | {{else}} 17 | bar 18 | {{/each}} 19 | {{/if}} 20 |
    21 | 22 |
    23 | {{#if foo}} 24 | foo 25 | {{else}} 26 | bar 27 | {{/if}} 28 |
    29 | -------------------------------------------------------------------------------- /tests/test.css: -------------------------------------------------------------------------------- 1 | @media (min-with:900px) { 2 | div[name="btn"] { 3 | height:10px; /* comment */ } 4 | #aeetoto { 5 | width: 100%; background: #a37; 6 | } 7 | } 8 | 9 | div, #aeetoto { 10 | width: 100%; background-color: #ff4136; 11 | } 12 | 13 | body { 14 | width: 100px; 15 | } 16 | 17 | @font-face { 18 | font-family: 'Exo'; 19 | src: 20 | url('titi'), 21 | url('toto'); 22 | font-weight: 700; 23 | } 24 | 25 | 26 | .dialog INPUT[type=button]:hover, 27 | .btn { color:#0aa; width:100%; } 28 | 29 | div, #aeetoto { 30 | width: 100%; background-color: #ff4136; 31 | } 32 | 33 | @media (min-with:900px) { 34 | div[name="btn"] { 35 | height:10px; /* comment */ } 36 | #aeetoto { 37 | width: 100%; 38 | } 39 | } 40 | div:nth-of-type(5n):not(:nth-of-type(3n)):before { 41 | content: ""; 42 | } 43 | 44 | :root{ 45 | --main-bg-color: pink; 46 | } 47 | 48 | @font-face { 49 | font-family: "Bitstream Vera Serif Bold"; 50 | src: url("/static/styles/libs/font-awesome/fonts/fontawesome-webfont.fdf491ce5ff5.woff"); 51 | } 52 | 53 | @keyframes pulse { 54 | 0% { 55 | background-color: #001f3f; 56 | } 57 | 100% { 58 | background-color: #ff4136; 59 | } 60 | } 61 | 62 | @media only screen 63 | and (min-device-width: 320px) 64 | and (max-device-width: 480px) 65 | and (-webkit-min-device-pixel-ratio: 2) { 66 | 67 | .module { width: 100%; } 68 | 69 | } 70 | 71 | @page :first { 72 | margin: 1in; 73 | } 74 | 75 | @charset "UTF-8"; 76 | @import 'global.css'; 77 | /* Namespace for XHTML */ 78 | @namespace url(http://www.w3.org/1999/xhtml); 79 | 80 | /* Namespace for SVG embedded in XHTML */ 81 | @namespace svg url(http://www.w3.org/2000/svg); 82 | 83 | body { 84 | font-family: "Bitstream Vera Serif Bold", serif; 85 | } 86 | 87 | 88 | 89 | @media print { 90 | #ee2dd, #footer, aside { 91 | display:none; 92 | } 93 | body { 94 | font-size:120%; 95 | color:black; 96 | } 97 | } 98 | 99 | @media screen and (max-width: 640px) { 100 | .bloc { 101 | display:block; 102 | clear:both; 103 | } 104 | } 105 | 106 | 107 | /* On ajoute un paramètre de secours */ 108 | .component .header { 109 | color: var(--header-color, blue); 110 | } 111 | 112 | @viewport { 113 | zoom: 0.75; 114 | min-zoom: 0.5; 115 | max-zoom: 0.9; 116 | } 117 | -------------------------------------------------------------------------------- /tests/test.css.erb: -------------------------------------------------------------------------------- 1 | 2 | H1 { color:white; 3 | with:100px; 4 | } 5 | @media (min-with:900px) { 6 | div[name="btn"] { 7 | height:10px; /* comment */ } 8 | } 9 | H1 { 10 | color:white; 11 | <% if true %> 12 | height:300px; 13 | <% end %> 14 | } 15 | -------------------------------------------------------------------------------- /tests/test.djhtml: -------------------------------------------------------------------------------- 1 | {% if something %} 2 | {% endif %} 3 | 4 | related issues: #293 5 | 6 |
    7 | 8 | 9 |
    10 | 11 | 12 | 13 | 14 | {% if something %} 15 | {% if something2 %}{% endif %} {{ }} 16 | {% endif %} 17 | 18 | {% if something %} {{ }} 19 | {% endif %} 20 | 21 | {% for book in books|dictsort:"author.age" %} 22 | * {{ book.title }} ({{ book.author.name }}) 23 | {% endfor %} 24 | 25 | {% widthratio this_value max_value max_width as width %} 26 | {% blocktrans %}The width is: {{ width }}{% endblocktrans %} 27 | 28 |
    29 | {{ form_widget(form.address.city, {'attr': {'class': 'form-control form-control-md'}}) }} 30 |
    31 | 32 | {% if something %} 33 | {% if something2 %}{% endif %}{{ }} 34 | {% endif %} 35 | 36 | {% block title %}{% endblock %} 37 | 38 | Indented 39 | 40 |
    41 |

    43 | the open control block above is inside an html attr

    44 | 47 |
    48 | 49 | 50 | related issues: #417 51 | 52 | {{ athlete_list|length }} 53 | 54 | {% for_custom_tag %} 55 | Element should not be indented 56 | 57 | {% block_custom_tag %} 58 | Element should not be indented 59 | 60 | {% non_keyword_start %} 61 | Element should not be indented 62 | 63 |
    64 | issue#466 65 | {% if block %} 66 | Content 67 | {% endif %} 68 |
    69 | 70 | {% trans "" %} 71 | Element should not be indented 72 | -------------------------------------------------------------------------------- /tests/test.dtl: -------------------------------------------------------------------------------- 1 | 2 | {% for o in some_list %} 3 | 4 | ...{{ value|center:"15" }} 5 | 6 | {% endfor %} 7 | 8 | 9 | {{ value|removetags:"b span"|safe }} 10 | 11 | {{ some_list|safeseq|join:", " }} 12 | 13 | {% for x, y in points %} 14 | There is a point at {{ x }},{{ y }} 15 | {% endfor %} 16 | 17 |
      18 |
    • 19 | {% autoescape on %} 20 | This is escaped: {{ var1 }} 21 | {% autoescape off %} 22 | This is not escaped: {{ var1 }} 23 | This is escaped: {{ var1|escape }} 24 | {% endautoescape %} 25 | {% endautoescape %} 26 |
    • 27 |
    • 28 | {% if 99 99 %} 29 | if: 99 and 99 are equal 30 | {% else %} 31 | else: 99 and 99 are not equal 32 | {% endif %} 33 |
    • 34 |
    • 35 | {% ifequal 99 99 %} 36 | if: 99 and 99 are equal 37 | {% else %} 38 | else: 99 and 99 are not equal 39 | {% endifequal %} 40 |
    • 41 |
    42 | -------------------------------------------------------------------------------- /tests/test.eex: -------------------------------------------------------------------------------- 1 | <%= if 1 + 1 == 2 do %> 2 | Truth 3 | <% else %> 4 | What? 5 | <% end %> 6 | 7 | <%= for i <- 1..10 do %> 8 | <%= i %> 9 | <% end %> 10 | 11 | <%= content_tag :a, href: "https://example.com" do %> 12 | Hello! 13 | <% end %> 14 | 15 | <%= form_for @changeset, @action, fn _form -> %> 16 | Hello again! 17 | <%= end %> 18 | -------------------------------------------------------------------------------- /tests/test.ejs: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | <% 7 | var title = page.title; 8 | if (is_archive()){ 9 | title = 'Archives'; 10 | if (is_month()){ 11 | title += ': ' + page.year + '/' + page.month; 12 | } else if (is_year()) { 13 | title += ': ' + page.year; 14 | } 15 | } else if (is_category()){ 16 | title = 'Category: ' + page.category; 17 | } else if (is_tag()){ 18 | title = 'Tag: ' + page.tag; 19 | } 20 | %> 21 | <% if (title){ %><%= title %> | <% } %><%= config.title %> 22 | 23 | <%- open_graph({twitter_id: theme.twitter, google_plus: theme.google_plus, fb_admins: theme.fb_admins, fb_app_id: theme.fb_app_id}) %> 24 | <% if (theme.rss){ %> 25 | 26 | <% } %> 27 | <% if (theme.favicon){ %> 28 | 29 | <% } %> 30 | 31 | <%- css('css/style') %> 32 | 33 | 34 | <%- body %> 35 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /tests/test.epl: -------------------------------------------------------------------------------- 1 |
    2 | % my $block = begin 3 | % my $name = shift; 4 | Hello <%= $name %>. 5 | % end 6 |
    7 | 8 |
    9 | 10 | % if ($a) { 11 |

    If

    12 | % } else { 13 |

    Else

    14 | % } 15 | 16 |
    17 | 18 | <% 19 | if ($a) { 20 | $b = $a; 21 | } else { 22 | $b = ""; 23 | } 24 | %> -------------------------------------------------------------------------------- /tests/test.erb: -------------------------------------------------------------------------------- 1 | <% unless @starred_stories.empty? %> 2 | <% if @starred_stories.total_pages > 1 %> 3 | <%= render_js :stories, { stories: @starred_stories } %> 4 | <% end %> 5 | <% end %> 6 | 7 |
    8 | <%= mail_to("", 9 | "Email to a friend", 10 | :subject => @listing.display_title, 11 | body: "I found this listing online, and thought you might be interested:\n#{@listing.url}", 12 | :class => 'mail') %> 13 |
    14 | 15 |
    16 | <%= render partial: 'some_partial', 17 | locals: { 18 | icon: nil, 19 | errors: [], 20 | title: 'Title' 21 | } 22 | %> 23 |
    24 | 25 |
    26 |
    27 | <% 28 | a = [ 29 | [1, 2], 30 | [3, 4] 31 | ] 32 | b = 10 33 | %> 34 |
    35 |
    36 | 37 | 44 | 45 |
    46 | <% flash.each do |key, value| -%> 47 |
    <%=h value %>
    48 | <% end %> 49 |
    50 | 51 |
    52 | <% if request.xhr? %> 53 | 54 | <% end %> 55 |
    56 | 57 | 58 | <% 59 | if foo 60 | puts "foo" 61 | puts "foo" 62 | 63 | 64 | puts "foo" 65 | puts "foo" 66 | end 67 | 68 | $age = 5 69 | case $age 70 | when 0 .. 2 71 | puts "baby" 72 | when 3 .. 6 73 | puts "little child" 74 | when 7 .. 12 75 | puts "child" 76 | when 13 .. 18 77 | puts "youth" 78 | else 79 | puts "adult" 80 | end 81 | 82 | class Greeter 83 | 84 | def initialize(name = "World") 85 | @name = name 86 | end 87 | 88 | def say_hi 89 | puts "Hi #{@name}!" 90 | end 91 | 92 | def say_bye 93 | puts "Bye #{@name}, come back soon." 94 | end 95 | 96 | end 97 | 98 | x=1 99 | if x > 2 100 | puts "x is greater than 2" 101 | elsif x <= 2 and x!=0 102 | puts "x is 1" 103 | else 104 | puts "I can't guess the number" 105 | end 106 | 107 | %> 108 | 109 | <% if request.xhr? %> 110 |
    111 | <% end %> 112 | 113 | 114 |
    115 | <% if request.xhr? %> 116 | 117 | <% else %> 118 |

    119 | <% end %> 120 |
    121 | 122 | <% @hash.each do |t, a| %> 123 |

    <%= t %>

    124 | <% a.each do |q| %> 125 | <%= link_to(q.question_answers_url) %>
    126 | <% end %> 127 | <% end %> 128 | 129 | 130 |
      131 | <% for @item in @shopping_list %> 132 |
    • <%= @item %>
    • 133 | <% end %> 134 |
    135 | -------------------------------------------------------------------------------- /tests/test.ftl: -------------------------------------------------------------------------------- 1 | 2 | 3 | Welcome! 4 | 5 | 6 | <#-- Greet the user with his/her name --> 7 |

    Welcome ${user}!

    8 |
    We have these animals: 9 |
      10 | <#list animals as animal> 11 |
    • ${animal.name} for ${animal.price} Euros
    • 12 | 13 |
    14 |
    15 | [#include "/WEB-INF/common/header.ftl"] 16 | [#assign testVar=false] 17 | [#if object?has_content] 18 | Has content 19 | [#else] 20 | No content 21 | [/#if] 22 | 23 | 24 | -------------------------------------------------------------------------------- /tests/test.gohtml: -------------------------------------------------------------------------------- 1 |
    2 | {{range .}} {{/* a comment */}} 3 | {{with .Author}} 4 |

    {{.}} wrote:

    5 | {{else}} 6 |

    An anonymous person wrote:

    7 | {{end}} 8 |
    {{.Content}}
    9 |
    10 |
    {{$piOver2}} 11 | {{define "myPage"}} 12 | {{template "head" .}} 13 | 14 | {{end}} 15 |
    16 | Name: {{.Text.Name | html}}{{index .Keys 3}} 17 |
    18 |
    19 | {{$checkinUsers := .CheckinUsers}} 20 | {{range $i, $v := .Checkins}} 21 | {{$user := index $checkinUsers $i}} 22 |
      23 |
    • 24 | {{"put" | printf "%s%s" "out" | printf "%q"}} 25 | {{$user.FirstName}} {{"\"output\""}} 26 |
    • 27 |
    28 | {{end}} 29 | {{end}} 30 | 31 | {{range $foo := .Bar}} 32 | 123 33 | {{end}} 34 | 35 | {{if .Bar}} 36 | true 37 | {{end}} 38 | 39 | 40 | {{rangeFn}} 41 | {{if .Bar}} 42 | true 43 | {{endTheWorld}} 44 | {{end}} 45 | 46 | {{ if .Bar }} 47 | true 48 | {{ end}} 49 | 50 |
    51 | -------------------------------------------------------------------------------- /tests/test.hero: -------------------------------------------------------------------------------- 1 | <%! 2 | import ( 3 | "fmt" 4 | "strings" 5 | ) 6 | 7 | var a int 8 | 9 | const b = "hello, world" 10 | 11 | func Add(a, b int) int { 12 | return a + b 13 | } 14 | 15 | type S struct { 16 | Name string 17 | } 18 | %> 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 |
    27 | <%: func define %> 28 | <%~ "parent template" %> 29 | <%+ "sub template" %> 30 | <%! go code %> 31 |
    32 | <%@ body { %> 33 | hello here 34 | <% } %> 35 |
    36 | <%== "hello" %> 37 | <%==i 34 %> 38 | <%==u Add(a, b) %> 39 | <%==s user.Name %> 40 |
    41 |
    42 | <% for _, user := userList { %> 43 | <% if user != "Alice" { %> 44 | <%= user %> 45 | <% } %> 46 | <% } %> 47 |
    48 |
    49 | <% 50 | a, b := 1, 2 51 | c := Add(a, b) 52 | %> 53 |
    54 |
    55 | <%# note %> 56 |
    57 | 58 | 59 | -------------------------------------------------------------------------------- /tests/test.html: -------------------------------------------------------------------------------- 1 | 2 |
    3 | hello world 6 | hello world 13 |
    14 | 15 |
    16 | 21 |
    22 | 23 |
    24 |
    25 |
      26 |
    • hello
    • 27 |
    • world
    • 28 |
    29 |
    30 |
    31 |
    extract / contract
    32 |
    33 | 34 | Related issues: #603 35 | 36 | 38 | 39 | 42 | 43 | 46 | 47 |
    48 |

    Zero

    49 | 50 | 51 |

    One

    52 | 53 | 54 |

    Two

    55 | 56 |

    Three

    57 | 58 |

    Four

    59 |
    60 | 61 | related issues: #290 62 |
    63 | 64 | 65 | 66 |

    lorem

    67 |
    68 | 69 |
    70 |

    71 | hello 72 |

    73 | 76 |
    bonjour
    77 | monde
    78 |
    79 | -------------------------------------------------------------------------------- /tests/test.js: -------------------------------------------------------------------------------- 1 | 2 | for ( var someLongVariable = 0; someLongVariable < someExtremely.long.prop; 3 | someLongVariable++ ) 4 | { 5 | doSomething(); 6 | } 7 | 8 | $("input").keypress(function() 9 | { 10 | var x = 2; 11 | }); 12 | 13 | let a; 14 | if (true) { 15 | a = 1; 16 | } else 17 | a = 2; 18 | 19 | if (1 === 1) 20 | { 21 | x = 1; 22 | } 23 | else 24 | { 25 | x = 2; 26 | } 27 | 28 | while (x) { 29 | if (true) a() 30 | b() 31 | c() 32 | } 33 | 34 | let newList = list.skipWhile(f) 35 | a() 36 | b() 37 | 38 | function Switch() { 39 | return whatever; 40 | } 41 | 42 | type T = {| 43 | x: number, 44 | titi: y 45 | |}; 46 | 47 | Relay.createContainer(Story, { 48 | initialVariables: { 49 | numCommentsToShow: 10, 50 | showComments: false, 51 | }, 52 | fragments: { 53 | story: (variables) => Relay.QL` 54 | fragment on Story { 55 | comments(first: $numCommentsToShow) @include(if: $showComments) { 56 | edges { 57 | node { 58 | author { name }, 59 | id, 60 | text, 61 | }, 62 | }, 63 | }, 64 | } 65 | `, 66 | } 67 | }); 68 | 69 | var cs = {completed: this.props.todo.completed, 70 | editing: this.props.editing}; 71 | 72 | const f = (x) => 73 | x + 1; 74 | 75 | const tptp = bar > baz ? 76 | value1 : 77 | value2; 78 | 79 | if (a) 80 | if (b) 81 | if (c) 82 | console.log("ici"); 83 | console.log("la"); 84 | 85 | var data = { 86 | password: this.password 87 | } 88 | 89 | if (true) { 90 | var Button = styled.button` 91 | border-radius: 3px; 92 | padding: 0.25em 1em; 93 | margin: 0 1em; 94 | background: transparent; 95 | color: palevioletred; 96 | border: 2px solid palevioletred; 97 | `; 98 | } 99 | 100 | VEOrganizer.prototype.unpatchVeToolbar = function() { 101 | ve.ui.Toolbar.prototype.getElementWindow = 102 | this.veUiToolbarPrototypeGetElementWindow; 103 | ve.ui.Toolbar.prototype.calculateOffset = 104 | this.veUiToolbarPrototypeCalculateOffset; 105 | }; 106 | 107 | if(!rstart.isCollapsed() || 108 | !this.ve.document.hasSlugAtOffset(rstart.to)) { 109 | groups = this.ve.document.getCoveredSiblingGroups(rstart); 110 | }; 111 | 112 | if(!this.begin(ed.isNew() ? "savenewmodule" : "savemodule", 113 | ed.getSaveData(this.state.segmentId, values))) { 114 | return false; 115 | } 116 | 117 | windowOffset.right = ( 118 | $(window).width() 119 | - this.$window.outerWidth() 120 | - windowOffset.left 121 | ); 122 | 123 | if(!rstart.isCollapsed() 124 | || this.ve.document.data.isContentOffset(rstart.to) 125 | || !this.ve.document.hasSlugAtOffset(rstart.to)) { 126 | groups = this.ve.document.getCoveredSiblingGroups(rstart); 127 | } 128 | 129 | var json = { 130 | msg: 'hello', 131 | attr: condition 132 | ? "This message" 133 | : "Some other message" 134 | } 135 | 136 | for (let type in types) 137 | doSomething(type); 138 | 139 | for (let type of types) 140 | doSomething(type); // should be indented 141 | 142 | ajax.post('/signup') 143 | .send(data); 144 | 145 | $(document.body) 146 | .append("") 147 | .attr(...); 148 | 149 | $('
    Open
    ') 150 | .attr("data-id", "foo"); 151 | 152 | $(document.body).append("") 153 | .attr(...); 154 | 155 | var str = "toto"; 156 | 157 | 'test/1'.match(/[a-z]+[0-9]+/g); 158 | 159 | 'test/1'.match(/[a-z]+\/[0-9]+/ug); 160 | 161 | return { 162 | nowShowing: Const.ALL_TODOS, 163 | editing: null 164 | }; 165 | 166 | class Person { 167 | @memoize 168 | get name() { return `${this.first} ici ${this.last}` } 169 | set name(val) { 170 | let [first, last] = val.split(' '); 171 | this.first = first; 172 | this.last = last; 173 | } 174 | } 175 | 176 | 177 | if (true) { 178 | var x; 179 | /* 180 | * Hello there. 181 | * Today is Saturday. 182 | */ 183 | var z; 184 | /* lorem 185 | ipsum */ 186 | var y; 187 | } 188 | 189 | var x = y, 190 | cd = 3; 191 | if (true) { 192 | var x = y, 193 | cd = 3; 194 | export const {x, y} = z, 195 | a = 10; 196 | } 197 | 198 | var pathData = this.barData 199 | .map(function(d) { 200 | return [{x: d.start_time_ms, vol: d.volume}, 201 | {x: d.end_time_ms, vol: d.volume}]; 202 | }) 203 | .reduce(function(a, b) { 204 | return a.concat(b); 205 | }); 206 | 207 | function toto(c) { 208 | switch(elem) { 209 | case "textarea" : 210 | return ( 1 ); 211 | break; 212 | case "text" : 213 | return ( 2 ); 214 | default : 215 | return 0; 216 | } 217 | } 218 | 219 | function hello() { 220 | if (x) 221 | console.log("lorem"); 222 | else 223 | console.log("ipsum"); 224 | } 225 | 226 | var obj = { 227 | "a": 1, 228 | "b": 2, 229 | "c": 3 230 | }; 231 | 232 | var arr = [1, 233 | 2, 234 | 3 235 | ]; 236 | 237 | function onYouTubePlayerAPIReady(videoid) { 238 | ytPlayer = new YT.Player('media_area', 239 | {videoId: videoid, 240 | playerVars: { 'rel': 0 } 241 | }); 242 | ytPlayer = new YT.Player('media_area', { 243 | videoId: videoid, 244 | playerVars: { 'rel': 0 } 245 | }); 246 | } 247 | 248 | var newB = new example(); 249 | 250 | newB.firstMethod('x') 251 | .secondMethod('y') 252 | .thirdMethod(1,15,'z'); 253 | 254 | var bar = 1; 255 | var foo = (bar == 1) ? 256 | "ONE" : "OTHER"; // THIS IS THE PROBLEM 257 | 258 | foo() { 259 | bar() 260 | baz() 261 | if(true) 262 | hello(); 263 | if (true) 264 | hello(); 265 | } 266 | 267 | function fieldIsValid(field, fieldSpec) { 268 | // todo: add remote possibility 269 | var value = field.value; 270 | if ( value.length < fieldSpec.minNumberOfChar || 271 | value.length > fieldSpec.maxNumberOfChar || 272 | value.match( fieldSpec.pattern) ) 273 | return true; 274 | return false; 275 | } 276 | -------------------------------------------------------------------------------- /tests/test.js.erb: -------------------------------------------------------------------------------- 1 | function hello() { 2 | <% if true %> 3 | // @This is javascript code 4 | alert('aa'); 5 | $('#click').on('click', function() { 6 | console.log('this is works'); 7 | }); 8 | <% end %> 9 | } 10 | -------------------------------------------------------------------------------- /tests/test.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%! 3 | public int sum(int a, int b) 4 | { 5 | return a + b; 6 | } 7 | 8 | private void doNothing(HttpServletResponse response) {} 9 | 10 | %> 11 | 12 | <% 13 | doNothing(response); 14 | %> 15 | 16 | 17 | 18 |

    19 |
    20 | 21 | 22 |
    23 | <% if (x) { %> 24 | <%= x %> 25 | <% } else { %> 26 | <%= x %> 27 | <% } %> 28 |
    29 | 30 | 31 | 33 | 34 | ${person.name}${person.age} 35 | 36 | ${ageTotal} 37 | 38 | <%@ taglib prefix="f" uri="/your-tld-uri"%> 39 | ... 40 | 41 | 42 | <%@ taglib uri="/you-taglib-uri" prefix="p" %> 43 | and use the tag: 44 | 45 | 46 | ${person.name}${person.age} 47 | 48 | 49 | 50 | <%= toto %> 51 | 52 |

    test

    53 | 54 | 55 | <% 56 | if ( haveError ) { 57 | request.setAttribute( "error 58 | xss", 59 | //todo : erreur d'indentation 60 | errors.toString()); 61 | pageContext.forward( "GetName.jsp" ); 62 | } else { 63 | pageContext.forward( "GetName.jsp" ); 64 | pageContext.forward( "NextPage.jspx" ); 65 | } 66 | %> 67 | 68 | 69 |
    70 | <%@ page import="business.*, data.*" /*comment*/ 71 | test="*indent attr*" %> 72 |
    73 | 74 |
    cdc
    75 | 76 | <% 77 | // This is a scriptlet. Notice that the "date" 78 | // variable we declare here is available in the 79 | // embedded expression later on. 80 | int i = 0 81 | System.out.println( "Evaluating date now" ); 82 | java.util.Date date = new java.util.Date(); 83 | %> 84 | 85 | 86 | <%! 87 | // declare here 88 | public void add(User user, String filename) throws IOException, ServletException { 89 | PrintWriter out = new PrintWriter(new FileWriter(filename, true)); 90 | out.println("toto" + "titi" + 91 | "titi" + 92 | user.getLastName()); 93 | out.close(); 94 | } 95 | 96 | %> 97 | 98 | 99 | 100 | 118 | 119 | 120 | 121 | <%-- cdcd --%> 122 | -------------------------------------------------------------------------------- /tests/test.jsx.html: -------------------------------------------------------------------------------- 1 |
    2 | 5 | 14 |
    15 | -------------------------------------------------------------------------------- /tests/test.marko: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 |
      8 |
    • 9 | ${color} 10 |
    • 11 |
    12 | 14 |
    15 |
    16 | -------------------------------------------------------------------------------- /tests/test.mas: -------------------------------------------------------------------------------- 1 | <%after render> 2 | <% # Add analytics line after everything has rendered %> 3 | <& /shared/google_analytics_line.mi &> 4 | 5 | 6 | 7 | <%augment wrap> 8 | 9 | 10 | <% inner() %> 11 | 12 | 13 | 14 | 15 | <%around navbar> 16 | 19 | 20 | 21 | <%override navbar> 22 | <% super() %> 23 | extra 24 | 25 | 26 | <%flags> 27 | extends => '/foo/bar' 28 | 29 | 30 | <%perl> 31 | my $article = MyApp::Article->find($.article_id); 32 | my $title = $article->title; 33 | 34 | 35 | <%init> 36 | my $article = MyApp::Article->find($.article_id); 37 | my $title = $article->title; 38 | 39 | 40 | <%class> 41 | $a 42 | 43 | 44 | <%after render> 45 | <% # Add analytics line after everything has rendered %> 46 | <& /shared/google_analytics_line.mi &> 47 | 48 | 49 | <%augment wrap> 50 | 51 | 52 | <% inner() %> 53 | 54 | 55 | 56 | 57 | <%around navbar> 58 | 61 | 62 | 63 | <%override navbar> 64 | <% super() %> 65 | extra 66 | 67 | 68 | <% $content | NoBlankLines,Trim %> 69 | 70 | <%doc> 71 | Name: foo.mc 72 | Purpose: ... 73 | 74 | -------------------------------------------------------------------------------- /tests/test.mustache: -------------------------------------------------------------------------------- 1 |
      2 | {{#items}} 3 | {{#first}} 4 |
    • {{name}}
    • 5 | {{/first}} 6 | {{#link}} 7 |
    • 8 | {{#link-to 'photos.edit' photo}}{{photo.title}}{{/link-to}} 9 |
    • 10 | {{/link}} 11 | {{/items}} 12 |
    13 | -------------------------------------------------------------------------------- /tests/test.psp: -------------------------------------------------------------------------------- 1 | 11 | toto 12 | 13 |
    14 | 20 | 21 |
    22 |
    23 | 30 |
    31 |
    32 | setHeaders(); 44 | $meth = $wgRequest->getMethod(); 45 | switch ($meth) { 46 | case "GET": 47 | $this->methodGETs(); 48 | break; 49 | case "POST": 50 | $this->methodPOST(); 51 | break; 52 | default: 53 | $this->renderNothing(); 54 | } 55 | 56 | if ( empty($id) || 57 | empty($name) ) { 58 | $this->renderNothing( "organisation_name" ); 59 | return; 60 | } 61 | 62 | $res = $dbr->select('qrclient_organisations', 63 | array('organisation_name'), 64 | array('organisation_id' => $id, 65 | 1 => 2)); 66 | 67 | $questions = $this->query( 68 | "SELECT post.id, title, " . self::$query_vote . 69 | ", question, date, " . $this->vote_query 70 | ); 71 | 72 | ?> 73 |
    74 | 75 |
    76 | 125 | b($x->y() 134 | ->z("aaa" . "bbb" 135 | . "ccc")) 136 | ->c(); 137 | 138 | $aa->f1()->f2() 139 | ->f2(); 140 | return $aa->f1()->f2() 141 | ->f2(); 142 | $a->x = $b->y 143 | ->z . "aaa" 144 | . "bbbb"; 145 | ?> 146 |
    147 | 148 |
    149 | 167 |
    168 | 169 | 170 | related issues: #293 171 | 172 |
    173 | 174 | 175 |
    176 |
    177 | 183 |
    184 | 185 |
      186 |
    • 187 |
    • 188 |
    189 | 2 |

    { opts.title }

    3 | 11 | 12 | 13 | 14 |
    15 |

    { title }

    16 | Remove 17 |
    18 | 26 |
    27 | -------------------------------------------------------------------------------- /tests/test.scss: -------------------------------------------------------------------------------- 1 | /* cdcqd */ 2 | -------------------------------------------------------------------------------- /tests/test.soy: -------------------------------------------------------------------------------- 1 |
    2 | {param other: html} 3 | ici 4 | {@param other: html} 5 | {@param? other: html} 6 | {/param} 7 |
    8 |
    9 | {switch $numMarbles} 10 | {case 0} 11 | You have no marbles. 12 | {case 1, 2, 3} 13 | You have a normal number of marbles. 14 | {default} // 4 or more 15 | You have more marbles than you know what to do with. 16 | {/switch} 17 |
    18 |
    19 | {template .example} 20 | /** A leading doc comment. */ 21 | {@param name: string} 22 | {@param? height: int} /** A trailing doc comment. */ 23 | ... 24 | {/template} 25 |
    26 |
    27 | {call .mySubtemplate} 28 | {param aaa: $aaa /} 29 | {param bbb: $bbb /} 30 | {/call} 31 | 32 | {foreach $pair in $pairs} 33 | {call .exampleCallee} 34 | {param largerNum: $pair.largerInt /} 35 | {param smallerNum} 36 | {if $pair.smallerInt} 37 | {$pair.smallerInt} // if defined, pass it 38 | {else} 39 | {$pair.largerInt - 100} 40 | {/if} 41 | {/param} 42 | {/call} 43 | {/foreach} 44 | 45 |
    46 | -------------------------------------------------------------------------------- /tests/test.sql.psp: -------------------------------------------------------------------------------- 1 |
    2 | 1"; 10 | 11 | $query = "SELECT 12 | products.id, 13 | name 14 | FROM 15 | products 16 | LEFT JOIN( 17 | SELECT 18 | id 19 | FROM 20 | persons 21 | ) ON persons.id = personId 22 | WHERE 23 | persons.id > 12"; 24 | 25 | ?> 26 |
    27 | -------------------------------------------------------------------------------- /tests/test.svelte: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {#each $items as {id, name}, i} 6 |
    7 | {id} {"name"} 8 |
    9 | {@html expression} 10 | {@debug a, b, c} 11 | {/each} 12 | 13 | {#if $something} 14 | {#if something2} 15 | Sub Case 16 | {/if} 17 | {:else} 18 | Another case 19 | {/if} 20 | 21 | {#await promise} 22 |

    ...waiting

    23 | {:then number} 24 |

    The number is {number}

    25 | {:catch error} 26 |

    {error.message}

    27 | {/await} 28 | -------------------------------------------------------------------------------- /tests/test.tpl: -------------------------------------------------------------------------------- 1 | {#title#} 2 |
      3 | {foreach $cols as $col} 4 |
    • {$col}
    • 5 | {/foreach} 6 |
    7 | 8 | {* this multiline smarty 9 | comment is xsxdc 10 | not sent to browser *} 11 | 12 | 13 | {if $logged_in} 14 |

    Welcome, {$name}

    15 | {else} 16 |

    Signup

    17 | {/if} 18 | {$var->method()} 19 | 20 |
      21 | {foreach $myColors as $color} 22 |
    • {$color}
    • 23 | {/foreach} 24 |
    25 | 26 | {"="|str_repeat:80} 27 | 28 | {$smarty.env.PATH} 29 | 30 | {include file="header.tpl" nocache} 31 | 32 | {assign var=foo value={$counter}} // plugin result 33 | 34 | {assign var=foo value=substr($bar,2,5)} // PHP function result 35 | 36 | {assign var=foo value=$bar|strlen} // using modifier 37 | 38 | {assign var=foo value=$buh+$bar|strlen} // more complex expression 39 | 40 | {html_select_date display_days=true} 41 | 42 | {mailto address="smarty@example.com"} 43 | 44 | 47 | 48 | {counter start=0 skip}
    49 | 50 | {func var="test $foo test"} 51 | 52 | {$foo->bar-$bar[1]*$baz->foo->bar()-3*7} 53 | 54 | {include file=$includeFile} 55 | 56 | {html_options options=$vals selected=$selected_id} 57 | -------------------------------------------------------------------------------- /tests/test.tt: -------------------------------------------------------------------------------- 1 | [% single-line block %] 2 | 3 | [% 4 | multi-line block 5 | %] 6 | -------------------------------------------------------------------------------- /tests/test.vtl: -------------------------------------------------------------------------------- 1 |

    velocity / vtl /cheetah / ssp

    2 | 3 |
    4 | 5 | #if(true) something #end 6 | 7 | #set( $value = $foo + 1 ) 8 | 9 | #def foo() 10 | bar 11 | #end 12 | 13 | #define foo() 14 | bar 15 | #end 16 | 17 | 18 |
    19 | --------------------------------------------------------------------------------