{"action":"created","issue":{"url":"https://api.github.com/repos/rburns/ansi-to-html/issues/30","repository_url":"https://api.github.com/repos/rburns/ansi-to-html","labels_url":"https://api.github.com/repos/rburns/ansi-to-html/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/rburns/ansi-to-html/issues/30/comments","events_url":"https://api.github.com/repos/rburns/ansi-to-html/issues/30/events","html_url":"https://github.com/rburns/ansi-to-html/issues/30","id":195566232,"number":30,"title":"Support for code 22","user":{"login":"mlucool","id":1813603,"avatar_url":"https://avatars.githubusercontent.com/u/1813603?v=3","gravatar_id":"","url":"https://api.github.com/users/mlucool","html_url":"https://github.com/mlucool","followers_url":"https://api.github.com/users/mlucool/followers","following_url":"https://api.github.com/users/mlucool/following{/other_user}","gists_url":"https://api.github.com/users/mlucool/gists{/gist_id}","starred_url":"https://api.github.com/users/mlucool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mlucool/subscriptions","organizations_url":"https://api.github.com/users/mlucool/orgs","repos_url":"https://api.github.com/users/mlucool/repos","events_url":"https://api.github.com/users/mlucool/events{/privacy}","received_events_url":"https://api.github.com/users/mlucool/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-14T15:45:46Z","updated_at":"2016-12-16T05:03:09Z","closed_at":null,"body":"Hi,\r\n\r\nPlease add support for escape code 22.\r\n\r\nPer Wikipedia: https://en.wikipedia.org/wiki/ANSI_escape_code\r\n```22\tNormal color or intensity\tNeither bold nor faint```\r\n\r\nExample:\r\n```javascript\r\nconst ANSIToHTML = require('ansi-to-html');\r\nconst text = '\\x1b[1mHello\\x1b[22m World';\r\nconsole.log(text);\r\nconsole.log(new ANSIToHTML({fg: '#000', bg: '#FFF', newline: true}).toHtml(text));\r\n// \"\\u001b[1mHello\\u001b[22m World\"\r\n// \"<b>Hello World</b>\"\r\n```\r\nLink: https://runkit.com/585164c7c92fa7001463dd8b/585167e71ca9e00014bc2cff\r\n\r\nThe ```</b>``` is around the whole expression instead of correctly around just Hello.\r\n\r\nThis comes up because [chalk](https://www.npmjs.com/package/chalk) uses this (and it works just fine with node cli):\r\n```javascript\r\nconst chalk = require(\"chalk\")\r\nconsole.log(chalk.styles.bold);\r\nconsole.log(chalk.bold('Test') + ' me')\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/rburns/ansi-to-html/issues/comments/267517650","html_url":"https://github.com/rburns/ansi-to-html/issues/30#issuecomment-267517650","issue_url":"https://api.github.com/repos/rburns/ansi-to-html/issues/30","id":267517650,"user":{"login":"rburns","id":67695,"avatar_url":"https://avatars.githubusercontent.com/u/67695?v=3","gravatar_id":"","url":"https://api.github.com/users/rburns","html_url":"https://github.com/rburns","followers_url":"https://api.github.com/users/rburns/followers","following_url":"https://api.github.com/users/rburns/following{/other_user}","gists_url":"https://api.github.com/users/rburns/gists{/gist_id}","starred_url":"https://api.github.com/users/rburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rburns/subscriptions","organizations_url":"https://api.github.com/users/rburns/orgs","repos_url":"https://api.github.com/users/rburns/repos","events_url":"https://api.github.com/users/rburns/events{/privacy}","received_events_url":"https://api.github.com/users/rburns/received_events","type":"User","site_admin":false},"created_at":"2016-12-16T05:03:09Z","updated_at":"2016-12-16T05:03:09Z","body":"It would be nice to have. And possibly a little tricky to implement. I would think you'd need to at least account for the two scenarios here: https://github.com/rburns/ansi-to-html/commit/1fc513cf1ae170094c0635d1d5bd23d30f786776. But, you can probably imagine other scenarios where mismatched opening/closing tags could arise.\r\n\r\nHaving said that, 24 Underline is already implemented. And doesn't appear to take into account those edge cases. https://github.com/rburns/ansi-to-html/blob/unstyle/test/ansi_to_html.coffee#L118-L121 https://github.com/rburns/ansi-to-html/blob/unstyle/src/ansi_to_html.coffee#L129 So, maybe it's not a practical problem.\r\n\r\nNot sure when I'll find the time to look at this in more detail. Could be soon. Patches welcome, in any case."}}
{"actor":{"display_login":"rburns"}}