{"action":"closed","issue":{"url":"https://api.github.com/repos/sass/libsass/issues/1413","labels_url":"https://api.github.com/repos/sass/libsass/issues/1413/labels{/name}","comments_url":"https://api.github.com/repos/sass/libsass/issues/1413/comments","events_url":"https://api.github.com/repos/sass/libsass/issues/1413/events","html_url":"https://github.com/sass/libsass/issues/1413","id":97740765,"number":1413,"title":"Incorrect parsing of consecutive quoted strings, unquoted strings and interpolations.","user":{"login":"andrew-skybound","id":1355174,"avatar_url":"https://avatars.githubusercontent.com/u/1355174?v=3","gravatar_id":"","url":"https://api.github.com/users/andrew-skybound","html_url":"https://github.com/andrew-skybound","followers_url":"https://api.github.com/users/andrew-skybound/followers","following_url":"https://api.github.com/users/andrew-skybound/following{/other_user}","gists_url":"https://api.github.com/users/andrew-skybound/gists{/gist_id}","starred_url":"https://api.github.com/users/andrew-skybound/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrew-skybound/subscriptions","organizations_url":"https://api.github.com/users/andrew-skybound/orgs","repos_url":"https://api.github.com/users/andrew-skybound/repos","events_url":"https://api.github.com/users/andrew-skybound/events{/privacy}","received_events_url":"https://api.github.com/users/andrew-skybound/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sass/libsass/labels/Bug%20-%20Confirmed","name":"Bug - Confirmed","color":"e11d21"},{"url":"https://api.github.com/repos/sass/libsass/labels/Dev%20-%20PR%20Ready","name":"Dev - PR Ready","color":"00FF00"},{"url":"https://api.github.com/repos/sass/libsass/labels/Dev%20-%20Test%20Written","name":"Dev - Test Written","color":"bfe5bf"}],"state":"closed","locked":false,"assignee":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?v=3","gravatar_id":"","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/sass/libsass/milestones/4","html_url":"https://github.com/sass/libsass/milestones/3.3","labels_url":"https://api.github.com/repos/sass/libsass/milestones/4/labels","id":912458,"number":4,"title":"3.3","description":"- Better parser code\r\n- Selector functions\r\n- Parent Selector handling","creator":{"login":"mgreter","id":282293,"avatar_url":"https://avatars.githubusercontent.com/u/282293?v=3","gravatar_id":"","url":"https://api.github.com/users/mgreter","html_url":"https://github.com/mgreter","followers_url":"https://api.github.com/users/mgreter/followers","following_url":"https://api.github.com/users/mgreter/following{/other_user}","gists_url":"https://api.github.com/users/mgreter/gists{/gist_id}","starred_url":"https://api.github.com/users/mgreter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgreter/subscriptions","organizations_url":"https://api.github.com/users/mgreter/orgs","repos_url":"https://api.github.com/users/mgreter/repos","events_url":"https://api.github.com/users/mgreter/events{/privacy}","received_events_url":"https://api.github.com/users/mgreter/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":163,"state":"open","created_at":"2014-12-22T17:37:08Z","updated_at":"2015-08-24T03:03:17Z","due_on":"2015-07-31T22:00:00Z","closed_at":null},"comments":5,"created_at":"2015-07-28T15:52:36Z","updated_at":"2015-08-24T03:03:17Z","closed_at":"2015-08-24T03:03:17Z","body":"When no space is present between consecutive quoted strings, unquoted strings and interpolations, Libsass doesn't parse the sequence the same as Ruby sass does.\r\n\r\nFrom what I can tell, Ruby always generates a single string when the sequence contains an interpolation, and makes a list otherwise.  However, it inserts *spaces* into the generated string BETWEEN each quoted and unquoted string.\r\n\r\nHere are some examples to clear things up.  Note that I've used single quotes in the input, which Ruby always converts to double quotes in the output, but Libsass does not in some cases.  Maybe this should be a separate issue, I'm not sure.\r\n\r\nTest 1 (sequences with ONLY strings or ONLY interpolation):\r\n```\r\nfoo: A'A';\r\nfoo: 'A'B;\r\nfoo: A'B'C;\r\nfoo: 'A'B'C';\r\nfoo: A#{A};\r\nfoo: #{A}B;\r\nfoo: A#{B}C;\r\nfoo: #{A}B#{C};\r\n```\r\n\r\nTest 1 Output (Libsass and Ruby are identical here, including quotes):\r\n```\r\nfoo: A \"A\";\r\nfoo: \"A\" B;\r\nfoo: A \"B\" C;\r\nfoo: \"A\" B \"C\";\r\nfoo: AA;\r\nfoo: AB;\r\nfoo: ABC;\r\nfoo: ABC;\r\n```\r\n`type-of()` for the first 4 declarations above is \"list\"; `type-of()` for the second 4 is \"string\".\r\n\r\nTest 2 (sequences with both strings and interpolation):\r\n```\r\nfoo: 'A'#{B};\r\nfoo: #{A}'B';\r\nfoo: 'A'#{B}'C';\r\nfoo: #{A}'B'#{C};\r\nfoo: A#{B}'C';\r\nfoo: 'A'#{B}C;\r\nfoo: #{A}B'C';\r\nfoo: 'A'#{B}C'D';\r\nfoo: 'A'B#{C}D'E';\r\nfoo: A'B'#{C}D'E';\r\n```\r\n\r\nTest 2 Output (Ruby):\r\n```\r\nfoo: \"A\"B;\r\nfoo: A\"B\";\r\nfoo: \"A\"B\"C\";\r\nfoo: A\"B\"C;\r\nfoo: AB\"C\";\r\nfoo: \"A\"BC;\r\nfoo: AB \"C\";\r\nfoo: \"A\"BC \"D\";\r\nfoo: \"A\" BCD \"E\";\r\nfoo: A \"B\"CD \"E\";\r\n```\r\nNote that `type-of()` for all declarations above returns \"string\" in Ruby.  So the spaces would appear to be spaces in a single unquoted string.\r\n\r\nTest 2 Output (Libsass):\r\n```\r\nfoo: 'A'B;\r\nfoo: A 'B';       // incorrect, type-of() == list, length() == 2\r\nfoo: 'A'B'C';\r\nfoo: A 'B'C;      // incorrect, type-of() == list, length() == 2\r\nfoo: AB 'C';      // incorrect, type-of() == list, length() == 2\r\nfoo: 'A'BC;\r\nfoo: AB 'C';      // correct, BUT type-of() == list, length() == 2\r\nfoo: 'A'BC'D';    // incorrect, type-of() == string, but spaces are missing\r\nfoo: 'A'BCD'E';   // incorrect, type-of() == string, but spaces are missing\r\nfoo: A'B'CD'E';   // incorrect, type-of() == string, but spaces are missing\r\n```\r\n\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25076985-incorrect-parsing-of-consecutive-quoted-strings-unquoted-strings-and-interpolations?utm_campaign=plugin&utm_content=tracker%2F283068&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F283068&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"}}