Skip to content

Commit c0e6fea

Browse files
andreypopptj
authored andcommitted
Fix how declarations are mapped
1 parent 8c1f2ec commit c0e6fea

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

lib/identity.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ function Compiler(options) {
1717
this.indentation = options.indent;
1818
}
1919

20-
/**
21-
* Emit string and update current position
22-
*/
23-
2420
Compiler.prototype.updatePosition = function(str) {
2521
var lines = str.match(/\n/g);
2622
if (lines) this.position.line += lines.length;
2723
var i = str.lastIndexOf('\n');
2824
this.position.column = ~i ? str.length - i : this.position.column + str.length;
2925
}
3026

27+
/**
28+
* Emit string and update current position
29+
*/
30+
3131
Compiler.prototype.emit = function(str, pos, startOnly) {
3232
if (pos && pos.start) {
3333
this.map.addMapping({
@@ -250,9 +250,7 @@ Compiler.prototype.rule = function(node){
250250

251251
Compiler.prototype.declaration = function(node){
252252
return this.emit(this.indent())
253-
+ this.emit(node.property, node.position)
254-
+ this.emit(': ')
255-
+ this.emit(node.value, node.position)
253+
+ this.emit(node.property + ': ' + node.value, node.position)
256254
+ this.emit(';');
257255
};
258256

0 commit comments

Comments
 (0)