{"action":"created","issue":{"url":"https://api.github.com/repos/aosabook/500lines/issues/136","repository_url":"https://api.github.com/repos/aosabook/500lines","labels_url":"https://api.github.com/repos/aosabook/500lines/issues/136/labels{/name}","comments_url":"https://api.github.com/repos/aosabook/500lines/issues/136/comments","events_url":"https://api.github.com/repos/aosabook/500lines/issues/136/events","html_url":"https://github.com/aosabook/500lines/issues/136","id":104677622,"number":136,"title":"preprocessor.py inserts leading '/' in code block for template engine chapter","user":{"login":"MichaelDiBernardo","id":2091754,"avatar_url":"https://avatars.githubusercontent.com/u/2091754?v=3","gravatar_id":"","url":"https://api.github.com/users/MichaelDiBernardo","html_url":"https://github.com/MichaelDiBernardo","followers_url":"https://api.github.com/users/MichaelDiBernardo/followers","following_url":"https://api.github.com/users/MichaelDiBernardo/following{/other_user}","gists_url":"https://api.github.com/users/MichaelDiBernardo/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelDiBernardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelDiBernardo/subscriptions","organizations_url":"https://api.github.com/users/MichaelDiBernardo/orgs","repos_url":"https://api.github.com/users/MichaelDiBernardo/repos","events_url":"https://api.github.com/users/MichaelDiBernardo/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelDiBernardo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-03T12:14:39Z","updated_at":"2016-02-29T16:24:01Z","closed_at":null,"body":"See first code block under 'Helper Functions' section. There is a `/self` and `/msg`, which I guess has something to do with the leading paren to its left. \r\n\r\nRunning `preprocessor.py`  on the source markdown inserts these slashes, so there must be a regexp in there that is misbehaving."},"comment":{"url":"https://api.github.com/repos/aosabook/500lines/issues/comments/190276029","html_url":"https://github.com/aosabook/500lines/issues/136#issuecomment-190276029","issue_url":"https://api.github.com/repos/aosabook/500lines/issues/136","id":190276029,"user":{"login":"xakon","id":961619,"avatar_url":"https://avatars.githubusercontent.com/u/961619?v=3","gravatar_id":"","url":"https://api.github.com/users/xakon","html_url":"https://github.com/xakon","followers_url":"https://api.github.com/users/xakon/followers","following_url":"https://api.github.com/users/xakon/following{/other_user}","gists_url":"https://api.github.com/users/xakon/gists{/gist_id}","starred_url":"https://api.github.com/users/xakon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xakon/subscriptions","organizations_url":"https://api.github.com/users/xakon/orgs","repos_url":"https://api.github.com/users/xakon/repos","events_url":"https://api.github.com/users/xakon/events{/privacy}","received_events_url":"https://api.github.com/users/xakon/received_events","type":"User","site_admin":false},"created_at":"2016-02-29T16:24:01Z","updated_at":"2016-02-29T16:24:01Z","body":"The responsible code for this mis-behavior is the `root_paths()` in `preprocessor.py`,\r\nwhich is activated using the `--html-paths` from the `build.py` script.  In particular,\r\nif the replacement string is changed to `r'(\\1)'`, it will stop adding the extra slash on the\r\ncode snippet.\r\n\r\nI have no idea, though, what is the purpose of this command-line parameter and the function.\r\nThere are no comments nor any help message.  I think it is better that the author to decide if he needs to update the code or slightly change it."}}