Skip to content

Commit bbad978

Browse files
committed
directive.raw is useless
1 parent 47e700d commit bbad978

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

src/directive.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function Directive (name, el, vm, descriptor, def, host, scope, frag, arg) {
3232
this.el = el
3333
this.vm = vm
3434
// copy descriptor props
35-
this.raw = descriptor.raw
3635
this.expression = descriptor.expression
3736
this.arg = arg || descriptor.arg
3837
this.filters = descriptor.filters

src/parsers/directive-new.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ exports.parse = function (s) {
8181
inSingle = inDouble = false
8282
curly = square = paren = 0
8383
lastFilterIndex = 0
84-
dir = { raw: str }
84+
dir = {}
8585

8686
for (i = 0, l = str.length; i < l; i++) {
8787
c = str.charCodeAt(i)

test/unit/specs/parsers/directive-new_spec.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,11 @@ describe('New Directive Parser', function () {
55
it('simple', function () {
66
var res = parse('exp')
77
expect(res.expression).toBe('exp')
8-
expect(res.raw).toBe('exp')
98
})
109

1110
it('with filters', function () {
1211
var res = parse('exp | abc de \'ok\' \'\' | bcd')
1312
expect(res.expression).toBe('exp')
14-
expect(res.raw).toBe('exp | abc de \'ok\' \'\' | bcd')
1513
expect(res.filters.length).toBe(2)
1614
expect(res.filters[0].name).toBe('abc')
1715
expect(res.filters[0].args.length).toBe(3)
@@ -28,7 +26,6 @@ describe('New Directive Parser', function () {
2826
it('double pipe', function () {
2927
var res = parse('a || b | c')
3028
expect(res.expression).toBe('a || b')
31-
expect(res.raw).toBe('a || b | c')
3229
expect(res.filters.length).toBe(1)
3330
expect(res.filters[0].name).toBe('c')
3431
expect(res.filters[0].args).toBeUndefined()

0 commit comments

Comments
 (0)