{"action":"opened","issue":{"url":"https://api.github.com/repos/byexamples/byexample/issues/35","repository_url":"https://api.github.com/repos/byexamples/byexample","labels_url":"https://api.github.com/repos/byexamples/byexample/issues/35/labels{/name}","comments_url":"https://api.github.com/repos/byexamples/byexample/issues/35/comments","events_url":"https://api.github.com/repos/byexamples/byexample/issues/35/events","html_url":"https://github.com/byexamples/byexample/issues/35","id":341512812,"node_id":"MDU6SXNzdWUzNDE1MTI4MTI=","number":35,"title":"$ in the expected is interpreted as the begin of a new Shell example","user":{"login":"eldipa","id":2665522,"node_id":"MDQ6VXNlcjI2NjU1MjI=","avatar_url":"https://avatars3.githubusercontent.com/u/2665522?v=4","gravatar_id":"","url":"https://api.github.com/users/eldipa","html_url":"https://github.com/eldipa","followers_url":"https://api.github.com/users/eldipa/followers","following_url":"https://api.github.com/users/eldipa/following{/other_user}","gists_url":"https://api.github.com/users/eldipa/gists{/gist_id}","starred_url":"https://api.github.com/users/eldipa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eldipa/subscriptions","organizations_url":"https://api.github.com/users/eldipa/orgs","repos_url":"https://api.github.com/users/eldipa/repos","events_url":"https://api.github.com/users/eldipa/events{/privacy}","received_events_url":"https://api.github.com/users/eldipa/received_events","type":"User","site_admin":false},"labels":[{"id":751215516,"node_id":"MDU6TGFiZWw3NTEyMTU1MTY=","url":"https://api.github.com/repos/byexamples/byexample/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-16T13:11:21Z","updated_at":"2018-07-16T13:11:21Z","closed_at":null,"author_association":"COLLABORATOR","body":"Consider the following Shell example\r\n```\r\n    $ cat ccc                      # byexample: +norm-ws                                                                       \r\n    Differences found between files 'file1' and 'file2':                                                                       \r\n    Nothing captured.                                                                                                          \r\n    Notes:                                                                                                                     \r\n         $: trailing spaces                                                                                                    \r\n        ^n: a blank line    ?: non-printable    ^t: tab                                                                        \r\n        ^v: vertical tab   ^r: carriage return  ^f: form feed\r\n```\r\n\r\nThis should be a single example however the line ``$: trailing spaces``, because begins with a ``$`` is interpreted as a new unexpected example and the original expected string gets truncated.\r\n\r\nThe current parser says \"collect the expected string till a new line or a prompt (``$`` in this case)\". One possible solution could be \"... till a prompt aligned\" so to be considered a new example the ``$`` must have the same indentation.\r\n\r\nThis however doesn't cover all the corners:\r\n\r\n```\r\n$ echo \"$ hello\"\r\n$ hello\r\n```\r\n "}}
{"actor":{"display_login":"eldipa"}}