{"action":"created","issue":{"url":"https://api.github.com/repos/jgm/CommonMark/issues/177","labels_url":"https://api.github.com/repos/jgm/CommonMark/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/jgm/CommonMark/issues/177/comments","events_url":"https://api.github.com/repos/jgm/CommonMark/issues/177/events","html_url":"https://github.com/jgm/CommonMark/issues/177","id":47508192,"number":177,"title":"\"HTML blocks\" section vague, doesn't match parsers","user":{"login":"jmendeth","id":1177304,"avatar_url":"https://avatars.githubusercontent.com/u/1177304?v=3","gravatar_id":"","url":"https://api.github.com/users/jmendeth","html_url":"https://github.com/jmendeth","followers_url":"https://api.github.com/users/jmendeth/followers","following_url":"https://api.github.com/users/jmendeth/following{/other_user}","gists_url":"https://api.github.com/users/jmendeth/gists{/gist_id}","starred_url":"https://api.github.com/users/jmendeth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmendeth/subscriptions","organizations_url":"https://api.github.com/users/jmendeth/orgs","repos_url":"https://api.github.com/users/jmendeth/repos","events_url":"https://api.github.com/users/jmendeth/events{/privacy}","received_events_url":"https://api.github.com/users/jmendeth/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jgm/CommonMark/labels/spec","name":"spec","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2014-11-01T15:17:35Z","updated_at":"2015-02-02T17:14:06Z","closed_at":null,"body":"The HTML blocks section provides the definition of an HTML block tag.\r\nLater on, the following example is presented:\r\n\r\n~~~\r\n<div class\r\nfoo\r\n~~~\r\n\r\nThe example header says: \"An incomplete HTML block tag may also start an HTML block\"\r\n\r\nThe problem with this is: **what's an incomplete HTML block tag?** There's no definition that allows me to parse the syntax for such a tag. Does a single `<` count as an incomplete tag? According to the [current] rules of HTML block parsing, the above would render as `<p>&lt;div class\\nfoo</p>`.\r\n\r\nBut even if we do provide a definition, what's the point in allowing incomplete tags? Could that be useful sometimes? And, more importantly, if an incomplete block tag can start a block, **why can't an incomplete comment, or an incomplete CDATA section, or an incomplete processing instruction start a block?**\r\n\r\n~~~\r\n<!--\r\n\r\nMarkdown here\r\n\r\n-->\r\n~~~\r\n\r\n~~~\r\n<![CDATA[ some data\r\n~~~\r\n"},"comment":{"url":"https://api.github.com/repos/jgm/CommonMark/issues/comments/72496004","html_url":"https://github.com/jgm/CommonMark/issues/177#issuecomment-72496004","issue_url":"https://api.github.com/repos/jgm/CommonMark/issues/177","id":72496004,"user":{"login":"jgm","id":3044,"avatar_url":"https://avatars.githubusercontent.com/u/3044?v=3","gravatar_id":"","url":"https://api.github.com/users/jgm","html_url":"https://github.com/jgm","followers_url":"https://api.github.com/users/jgm/followers","following_url":"https://api.github.com/users/jgm/following{/other_user}","gists_url":"https://api.github.com/users/jgm/gists{/gist_id}","starred_url":"https://api.github.com/users/jgm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgm/subscriptions","organizations_url":"https://api.github.com/users/jgm/orgs","repos_url":"https://api.github.com/users/jgm/repos","events_url":"https://api.github.com/users/jgm/events{/privacy}","received_events_url":"https://api.github.com/users/jgm/received_events","type":"User","site_admin":false},"created_at":"2015-02-02T17:14:06Z","updated_at":"2015-02-02T17:14:06Z","body":"+++ Xavier Mendez [Feb 02 15 08:04 ]:\n>> The problem with this, as explained above, is that it requires potentially indefinite backtracking in the parsers. We want to avoid that. I think that allowing partially formed tags is a reasonable price for avoiding backtracking.\n>\n>I misunderstood it then, sorry. When you said earlier: \"I think to deal with this properly we must keep the HTML block open til we hit an appropriate closer\", what should we do if we don't hit an appropiate closer?\n>Shouldn't we backtrack?\n\nNo.  If I forgot to mention it before, it would work like unclosed fenced code blocks currently work:  the entire remainder of the document would be considered part of the HTML block.\n\n>> I suppose we could mkae an exception for pre. (It seems a bit odd to me to include the caption in the pre element, though.)\n>\n>Semantically it makes sense. `<pre>` indicates a block of preformatted code, but the code itself goes under a `<code>`. The role of  `<pre>` for code is very similar to the role of `<figure>` for images.\n\nOkay."}}