Skip to content

Commit

Permalink
Merge pull request #205 from docteurklein/fix/detect-indent-src
Browse files Browse the repository at this point in the history
configure data context to know if sass or scss
  • Loading branch information
xzyfer authored Dec 15, 2016
2 parents c611b7c + d477bb3 commit eeb57a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sassc.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ void print_usage(char* argv0) {
printf(" -m, --sourcemap Emit source map.\n");
printf(" -M, --omit-map-comment Omits the source map url comment.\n");
printf(" -p, --precision Set the precision for numbers.\n");
printf(" -a, --sass Treat input as indented syntax.\n");
printf(" -v, --version Display compiled versions.\n");
printf(" -h, --help Display this help message.\n");
printf("\n");
Expand Down Expand Up @@ -247,10 +248,11 @@ int main(int argc, char** argv) {
{ "omit-map-comment", no_argument, 0, 'M' },
{ "precision", required_argument, 0, 'p' },
{ "version", no_argument, 0, 'v' },
{ "sass", no_argument, 0, 'a' },
{ "help", no_argument, 0, 'h' },
{ NULL, 0, NULL, 0}
};
while ((c = getopt_long(argc, argv, "vhslmMp:t:I:P:", long_options, &long_index)) != -1) {
while ((c = getopt_long(argc, argv, "vhslmMap:t:I:P:", long_options, &long_index)) != -1) {
switch (c) {
case 's':
from_stdin = 1;
Expand Down Expand Up @@ -290,6 +292,9 @@ int main(int argc, char** argv) {
sass_option_set_precision(options, atoi(optarg)); // TODO: make this more robust
if (sass_option_get_precision(options) < 0) sass_option_set_precision(options, 5);
break;
case 'a':
sass_option_set_is_indented_syntax_src(options, true);
break;
case 'v':
print_version();
sass_delete_options(options);
Expand Down

0 comments on commit eeb57a2

Please sign in to comment.