{"action":"closed","issue":{"url":"https://api.github.com/repos/nodeca/js-yaml/issues/66","labels_url":"https://api.github.com/repos/nodeca/js-yaml/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/nodeca/js-yaml/issues/66/comments","events_url":"https://api.github.com/repos/nodeca/js-yaml/issues/66/events","html_url":"https://github.com/nodeca/js-yaml/issues/66","id":11113469,"number":66,"title":"[writer] Implement full-weight scalar style resolver.","user":{"login":"dervus","id":1039540,"avatar_url":"https://avatars.githubusercontent.com/u/1039540?v=3","gravatar_id":"","url":"https://api.github.com/users/dervus","html_url":"https://github.com/dervus","followers_url":"https://api.github.com/users/dervus/followers","following_url":"https://api.github.com/users/dervus/following{/other_user}","gists_url":"https://api.github.com/users/dervus/gists{/gist_id}","starred_url":"https://api.github.com/users/dervus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dervus/subscriptions","organizations_url":"https://api.github.com/users/dervus/orgs","repos_url":"https://api.github.com/users/dervus/repos","events_url":"https://api.github.com/users/dervus/events{/privacy}","received_events_url":"https://api.github.com/users/dervus/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodeca/js-yaml/labels/improvement","name":"improvement","color":"d7e102"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2013-02-18T12:45:32Z","updated_at":"2015-04-22T08:37:23Z","closed_at":"2015-04-22T08:37:23Z","body":"It should resolve scalars to all available YAML scalar styles: [plain](http://www.yaml.org/spec/1.2/spec.html#id2788859), [single-quoted](http://www.yaml.org/spec/1.2/spec.html#id2788097), [double-quoted](http://www.yaml.org/spec/1.2/spec.html#id2787109), [folded](http://www.yaml.org/spec/1.2/spec.html#id2796251), and [literal](http://www.yaml.org/spec/1.2/spec.html#id2795688).\r\n\r\nExamples:\r\n``` yaml\r\ntext: Simple string.\r\n```\r\n``` yaml\r\ntext: 'String with trailing spaces...  '\r\n```\r\n``` yaml\r\ntext: \"String with unprintable (\\0, \\uFFFE) characters.\"\r\n```\r\n``` yaml\r\ntext: \"String with \\\"quotation\\\" 'mark' characters.\"\r\n```\r\n``` yaml\r\n# Folded style: there is only one line break after the title.\r\ntext: >\r\n  Multiline string.\r\n\r\n  This is very a long\r\n  text. It contains no\r\n  line breaks. So it\r\n  is better to use\r\n  folded style here.\r\n```\r\n``` yaml\r\n# Literal style: there is a line break after _each_ actual line.\r\ntext: |\r\n  This text contains\r\n  a lot of short lines.\r\n  So, it is better to\r\n  use literal style here.\r\n```\r\n\r\nNote. The actual resolver makes only rough choose between plain and double-quoted styles."}}