Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

closes #88 #89

Merged
merged 1 commit into from
Nov 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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