Skip to content

Commit

Permalink
Merge d7fbb75 into 81734aa
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Nov 5, 2016
2 parents 81734aa + d7fbb75 commit 23462e9
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
"compiler"
],
"devDependencies": {
"coveralls": "^2.11.12",
"eslint": "^3.4.0",
"coveralls": "^2.11.14",
"eslint": "^3.9.1",
"expect.js": "^0.3.1",
"istanbul": "^0.4.5",
"jspreproc": "^0.2.7",
"mocha": "^2.5.3",
"mocha": "^3.1.2",
"riot-bump": "^1.0.0"
},
"author": "Riot maintainers team + smart people from all over the world",
Expand Down
2 changes: 1 addition & 1 deletion src/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ var SPEC_TYPES = /^"(?:number|date(?:time)?|time|month|email|color)\b/i
* Matches the 'import' statement
* @const {RegExp}
*/
var IMPORT_STATEMENT = /^\s*import(?:\s*[*{]|\s+[$_a-zA-Z'"]).*\n?/gm
var IMPORT_STATEMENT = /^\s*import(?:(\s|\S)*)['|"]/gm

/**
* Matches trailing spaces and tabs by line.
Expand Down
2 changes: 1 addition & 1 deletion test/specs/expect/es6-import-untagged.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import* as foo from 'doe'
import 'bar'
import 'bar'
riot.tag2('import-untagged', '<h1>Hello</h1>', '', '', function(opts) {
});
24 changes: 20 additions & 4 deletions test/specs/expect/es6-import.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
import john from 'doe'
import foo from 'bar'
import { foo, bar, baz } from 'foo.bar.baz'
riot.tag2('import', '<h1>Hello</h1>', '', '', function(opts){
import foo from 'bar'
import { foo, bar, baz } from 'foo.bar.baz'
import {
foo,
bar,
baz
} from 'foo.bar.baz'
import {
foo,
bar,
baz } from 'foo.bar.baz'

import { foo,
bar,
baz } from 'foo.bar.baz'
riot.tag2('import', '<h1>Hello</h1>', '', '', function(opts) {


this.time = function(){
return Date()
}.bind(this)
});

});
14 changes: 14 additions & 0 deletions test/specs/fixtures/es6-import.tag
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@
import john from 'doe'
import foo from 'bar'
import { foo, bar, baz } from 'foo.bar.baz'
import {
foo,
bar,
baz
} from 'foo.bar.baz'
import {
foo,
bar,
baz } from 'foo.bar.baz'

import { foo,
bar,
baz } from 'foo.bar.baz'

time(){
return Date()
}
Expand Down

0 comments on commit 23462e9

Please sign in to comment.