@@ -25,16 +25,16 @@ namespace Sass {
25
25
26
26
json_append_member (json_srcmap, " version" , json_mknumber (3 ));
27
27
28
+ const char *include = file.c_str ();
29
+ JsonNode *json_include = json_mkstring (include);
30
+ json_append_member (json_srcmap, " file" , json_include);
31
+
28
32
// pass-through sourceRoot option
29
33
if (!ctx.source_map_root .empty ()) {
30
34
JsonNode* root = json_mkstring (ctx.source_map_root .c_str ());
31
35
json_append_member (json_srcmap, " sourceRoot" , root);
32
36
}
33
37
34
- const char *include = file.c_str ();
35
- JsonNode *json_include = json_mkstring (include);
36
- json_append_member (json_srcmap, " file" , json_include);
37
-
38
38
JsonNode *json_includes = json_mkarray ();
39
39
for (size_t i = 0 ; i < source_index.size (); ++i) {
40
40
const char *include = links[source_index[i]].c_str ();
@@ -54,15 +54,15 @@ namespace Sass {
54
54
json_append_member (json_srcmap, " sourcesContent" , json_contents);
55
55
}
56
56
57
- std::string mappings = serialize_mappings ();
58
- JsonNode *json_mappings = json_mkstring (mappings.c_str ());
59
- json_append_member (json_srcmap, " mappings" , json_mappings);
60
-
61
57
JsonNode *json_names = json_mkarray ();
62
58
// so far we have no implementation for names
63
59
// no problem as we do not alter any identifiers
64
60
json_append_member (json_srcmap, " names" , json_names);
65
61
62
+ std::string mappings = serialize_mappings ();
63
+ JsonNode *json_mappings = json_mkstring (mappings.c_str ());
64
+ json_append_member (json_srcmap, " mappings" , json_mappings);
65
+
66
66
char *str = json_stringify (json_srcmap, " \t " );
67
67
std::string result = std::string (str);
68
68
free (str);
0 commit comments