{"action":"closed","issue":{"url":"https://api.github.com/repos/mattermost/mattermost-plugin-autolink/issues/7","repository_url":"https://api.github.com/repos/mattermost/mattermost-plugin-autolink","labels_url":"https://api.github.com/repos/mattermost/mattermost-plugin-autolink/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/mattermost/mattermost-plugin-autolink/issues/7/comments","events_url":"https://api.github.com/repos/mattermost/mattermost-plugin-autolink/issues/7/events","html_url":"https://github.com/mattermost/mattermost-plugin-autolink/issues/7","id":335756092,"node_id":"MDU6SXNzdWUzMzU3NTYwOTI=","number":7,"title":"Code blocks still broken in some cases","user":{"login":"ThiefMaster","id":179599,"node_id":"MDQ6VXNlcjE3OTU5OQ==","avatar_url":"https://avatars1.githubusercontent.com/u/179599?v=4","gravatar_id":"","url":"https://api.github.com/users/ThiefMaster","html_url":"https://github.com/ThiefMaster","followers_url":"https://api.github.com/users/ThiefMaster/followers","following_url":"https://api.github.com/users/ThiefMaster/following{/other_user}","gists_url":"https://api.github.com/users/ThiefMaster/gists{/gist_id}","starred_url":"https://api.github.com/users/ThiefMaster/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThiefMaster/subscriptions","organizations_url":"https://api.github.com/users/ThiefMaster/orgs","repos_url":"https://api.github.com/users/ThiefMaster/repos","events_url":"https://api.github.com/users/ThiefMaster/events{/privacy}","received_events_url":"https://api.github.com/users/ThiefMaster/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2018-06-26T10:30:42Z","updated_at":"2018-07-16T16:17:42Z","closed_at":"2018-07-16T16:17:42Z","author_association":"NONE","body":"In this case, *test* is not converted, since the plugin thinks it's inside a fenced codeblock - but it's not, since the fences are in separate code blocks started by the four-space indentation:\r\n\r\n```\r\n    ```\r\n\r\ntest\r\n\r\n    ```\r\n```\r\n\r\n---\r\n\r\nAnother case of thinking *test* is inside a fenced code block even though it isn't:\r\n\r\n```\r\n` ``` `\r\ntest\r\n` ``` `\r\n```\r\n\r\n---\r\n\r\nIn this case, *test* is converted even though it is inside a code block (created by the four-space indentation:\r\n\r\n```\r\n    test\r\n```\r\n\r\n---\r\n\r\nI think the cleanest solution here would be using a markdown parser, i.e. convert to an AST, apply the linkification on text that is neither part of an existing link, nor inside a code block nor inline code. Like this it wouldn't matter to the plugin how the code block is created at all."}}
{"actor":{"display_login":"coreyhulen"}}