{"action":"created","issue":{"url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc/issues/9","repository_url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc","labels_url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc/issues/9/comments","events_url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc/issues/9/events","html_url":"https://github.com/asciidoctor/atom-language-asciidoc/issues/9","id":68815260,"number":9,"title":"List with bold is not correctly highlighted","user":{"login":"alefragnani","id":3781424,"avatar_url":"https://avatars.githubusercontent.com/u/3781424?v=3","gravatar_id":"","url":"https://api.github.com/users/alefragnani","html_url":"https://github.com/alefragnani","followers_url":"https://api.github.com/users/alefragnani/followers","following_url":"https://api.github.com/users/alefragnani/following{/other_user}","gists_url":"https://api.github.com/users/alefragnani/gists{/gist_id}","starred_url":"https://api.github.com/users/alefragnani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alefragnani/subscriptions","organizations_url":"https://api.github.com/users/alefragnani/orgs","repos_url":"https://api.github.com/users/alefragnani/repos","events_url":"https://api.github.com/users/alefragnani/events{/privacy}","received_events_url":"https://api.github.com/users/alefragnani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-04-16T00:16:42Z","updated_at":"2016-04-16T21:31:10Z","closed_at":null,"body":"Hi,\r\n\r\nWhen I use a list with bold at the beginning, the bold is not correctly highlighted. Look at the code below:\r\n\r\n![print-asciidoc-list-bold](https://cloud.githubusercontent.com/assets/3781424/7171837/40e6c3be-e3b4-11e4-9d42-757e7a8d5a1f.png)\r\n\r\nThe asciidoc-preview package otherwise, shows correctly.\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc/issues/comments/210905644","html_url":"https://github.com/asciidoctor/atom-language-asciidoc/issues/9#issuecomment-210905644","issue_url":"https://api.github.com/repos/asciidoctor/atom-language-asciidoc/issues/9","id":210905644,"user":{"login":"mojavelinux","id":79351,"avatar_url":"https://avatars.githubusercontent.com/u/79351?v=3","gravatar_id":"","url":"https://api.github.com/users/mojavelinux","html_url":"https://github.com/mojavelinux","followers_url":"https://api.github.com/users/mojavelinux/followers","following_url":"https://api.github.com/users/mojavelinux/following{/other_user}","gists_url":"https://api.github.com/users/mojavelinux/gists{/gist_id}","starred_url":"https://api.github.com/users/mojavelinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mojavelinux/subscriptions","organizations_url":"https://api.github.com/users/mojavelinux/orgs","repos_url":"https://api.github.com/users/mojavelinux/repos","events_url":"https://api.github.com/users/mojavelinux/events{/privacy}","received_events_url":"https://api.github.com/users/mojavelinux/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T21:31:10Z","updated_at":"2016-04-16T21:31:10Z","body":"Since you are now catching the attribute list in front of the formatting (e.g., `[.role]*text*`), I think we should assign different names to the captures so that they can be styled independently.\r\n\r\nFor the example I gave, I'm thinking of something like:\r\n\r\n```\r\n'captures':\r\n  '1': 'name': 'markup.attrlist.asciidoc'\r\n  '2': 'name': 'markup.bold.asciidoc'\r\n```\r\n\r\nIn order for this to work, you need to adjust the pattern so that it captures the right segments. As you probably know, a capture is done using `(...)`. You can create a non-capturing group using `(?:...)`. So we need to move around the use of `?:` so that it captures the attribute list and the formatting.\r\n\r\nFor the constrained case, that might look like:\r\n\r\n`'match': '(?:^|[^\\\\w;:}])(\\\\[(?:[^\\\\]]+?)\\\\])?(?!\\\\*{3})(\\\\*\\\\S\\\\*|\\\\*\\\\S[\\\\s\\\\S]*?\\\\S\\\\*)(?![\\\\w])'`\r\n\r\nNotice we don't capture the leading character and we capture the whole attribute list instead of the just the contents. This is different from what the processor does because the processor is interested in the content of these matches, not in styling them."}}