{"action":"opened","issue":{"url":"https://api.github.com/repos/mvonballmo/ts-earthli-markup-language/issues/1","repository_url":"https://api.github.com/repos/mvonballmo/ts-earthli-markup-language","labels_url":"https://api.github.com/repos/mvonballmo/ts-earthli-markup-language/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mvonballmo/ts-earthli-markup-language/issues/1/comments","events_url":"https://api.github.com/repos/mvonballmo/ts-earthli-markup-language/issues/1/events","html_url":"https://github.com/mvonballmo/ts-earthli-markup-language/issues/1","id":197624422,"number":1,"title":"Add block tokenizer","user":{"login":"mvonballmo","id":1214927,"avatar_url":"https://avatars.githubusercontent.com/u/1214927?v=3","gravatar_id":"","url":"https://api.github.com/users/mvonballmo","html_url":"https://github.com/mvonballmo","followers_url":"https://api.github.com/users/mvonballmo/followers","following_url":"https://api.github.com/users/mvonballmo/following{/other_user}","gists_url":"https://api.github.com/users/mvonballmo/gists{/gist_id}","starred_url":"https://api.github.com/users/mvonballmo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mvonballmo/subscriptions","organizations_url":"https://api.github.com/users/mvonballmo/orgs","repos_url":"https://api.github.com/users/mvonballmo/repos","events_url":"https://api.github.com/users/mvonballmo/events{/privacy}","received_events_url":"https://api.github.com/users/mvonballmo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-26T22:41:58Z","updated_at":"2016-12-26T22:41:58Z","closed_at":null,"body":"  - Enhance tag library to store the following for each tag:\r\n    - Block vs. Inline\r\n    - Preserve newlines\r\n    - Needs end tag\r\n  - This level processes tokens from the LowLevelTokenizer in the following way:\r\n    - Define a \"default\" tag (e.g. paragraph) to indicate how to handle text/newline before the first block tag appears\r\n    - Text: add to stream\r\n    - Newline: check tag properties to determine how to handle:\r\n      - If preserve newlines: add to stream\r\n      - Else if immediately after an open or close tag, discard\r\n      - Else add to stream\r\n    - Tag: collect attributes\r\n      - attribute: add to tag; go to value-expectation mode\r\n      - value: to to attribute-expectation mode\r\n      - error: add to tag or attribute;\r\n      - text or start tag: add current tag to stream, process anew\r\n      - end tag: if expected, add tag to stream, add end tag to stream; else add error\r\n    - EndTag: if expected, add to stream; else add error (out-of-order or no-end-tag-expected)\r\n\r\nThe formatter can use the following algorithm to process this stream:\r\n\r\nFor example, for lists:\r\n\r\n- Text: add to current item\r\n- Newline: store current item; create new item\r\n- Inline start tag: add to current item\r\n- Inline end tag: add to current item\r\n- Block start tag: store current item; create new item\r\n- Block end tag: store current item\r\n\r\nWe might be able to make this easier to process by fine-tuning the token output. Not sure it's necessary though. E.g. for HTML paragraphs:\r\n\r\n- Text: Emit `<p>` if necessary, emit text\r\n- Newline: emit `<p>` if necessary; emit `</p>`\r\n- Inline start tag: If supported, emit `<p>` if necessary, emit\r\n- Inline end tag: If supported, emit (don't have to worry about out-of-order)\r\n- Block start tag: Emit `</p>` if necessary\r\n- Block end tag: We'll never get this, because the other formatter handles it\r\n"}}
{"actor":{"display_login":"mvonballmo"}}