{"action":"created","issue":{"url":"https://api.github.com/repos/prettydiff/prettydiff/issues/158","labels_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/158/labels{/name}","comments_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/158/comments","events_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/158/events","html_url":"https://github.com/prettydiff/prettydiff/issues/158","id":104502448,"number":158,"title":"CFML support","user":{"login":"prettydiff","id":524902,"avatar_url":"https://avatars.githubusercontent.com/u/524902?v=3","gravatar_id":"","url":"https://api.github.com/users/prettydiff","html_url":"https://github.com/prettydiff","followers_url":"https://api.github.com/users/prettydiff/followers","following_url":"https://api.github.com/users/prettydiff/following{/other_user}","gists_url":"https://api.github.com/users/prettydiff/gists{/gist_id}","starred_url":"https://api.github.com/users/prettydiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettydiff/subscriptions","organizations_url":"https://api.github.com/users/prettydiff/orgs","repos_url":"https://api.github.com/users/prettydiff/repos","events_url":"https://api.github.com/users/prettydiff/events{/privacy}","received_events_url":"https://api.github.com/users/prettydiff/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/prettydiff/prettydiff/labels/Enhancement","name":"Enhancement","color":"207de5"},{"url":"https://api.github.com/repos/prettydiff/prettydiff/labels/QA","name":"QA","color":"bfd4f2"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/prettydiff/prettydiff/milestones/35","html_url":"https://github.com/prettydiff/prettydiff/milestones/v1.16.1","labels_url":"https://api.github.com/repos/prettydiff/prettydiff/milestones/35/labels","id":1428293,"number":35,"title":"v1.16.1","description":null,"creator":{"login":"prettydiff","id":524902,"avatar_url":"https://avatars.githubusercontent.com/u/524902?v=3","gravatar_id":"","url":"https://api.github.com/users/prettydiff","html_url":"https://github.com/prettydiff","followers_url":"https://api.github.com/users/prettydiff/followers","following_url":"https://api.github.com/users/prettydiff/following{/other_user}","gists_url":"https://api.github.com/users/prettydiff/gists{/gist_id}","starred_url":"https://api.github.com/users/prettydiff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prettydiff/subscriptions","organizations_url":"https://api.github.com/users/prettydiff/orgs","repos_url":"https://api.github.com/users/prettydiff/repos","events_url":"https://api.github.com/users/prettydiff/events{/privacy}","received_events_url":"https://api.github.com/users/prettydiff/received_events","type":"User","site_admin":false},"open_issues":6,"closed_issues":0,"state":"open","created_at":"2015-11-24T22:09:20Z","updated_at":"2015-12-09T05:51:16Z","due_on":null,"closed_at":null},"comments":42,"created_at":"2015-09-02T15:08:44Z","updated_at":"2015-12-09T14:04:50Z","closed_at":null,"body":"Add support for ColdFusion markup language.\r\n\r\n* create a new type in the parser `pragma`, which will include SGML tags, XML pragmas, and: cfset, cfhttp\r\n* cfelse needs to be added as a template \"else\" type in my parser.\r\n* self-closing tags:  cfinput, cfgridcolumn, cfset, cfinclude, cfimport\r\n\r\nI am having trouble finding a comprehensive list of CF11 tags and then having more diffecultly still determining which of those tags does not require an end tag.  If I know which tags are self-closing tags I can ensure they are treated as self-closing tags even if they end with `>` instead of `/>`.\r\n\r\nThe parser will not be intelligent enough to know if a custom tag should be self-closing by tag name alone.  These tags will be treated as self-closing tags if they terminate with `/>` otherwise they will be start tags that increase indentation."},"comment":{"url":"https://api.github.com/repos/prettydiff/prettydiff/issues/comments/163246762","html_url":"https://github.com/prettydiff/prettydiff/issues/158#issuecomment-163246762","issue_url":"https://api.github.com/repos/prettydiff/prettydiff/issues/158","id":163246762,"user":{"login":"finalcut","id":108001,"avatar_url":"https://avatars.githubusercontent.com/u/108001?v=3","gravatar_id":"","url":"https://api.github.com/users/finalcut","html_url":"https://github.com/finalcut","followers_url":"https://api.github.com/users/finalcut/followers","following_url":"https://api.github.com/users/finalcut/following{/other_user}","gists_url":"https://api.github.com/users/finalcut/gists{/gist_id}","starred_url":"https://api.github.com/users/finalcut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/finalcut/subscriptions","organizations_url":"https://api.github.com/users/finalcut/orgs","repos_url":"https://api.github.com/users/finalcut/repos","events_url":"https://api.github.com/users/finalcut/events{/privacy}","received_events_url":"https://api.github.com/users/finalcut/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T14:04:50Z","updated_at":"2015-12-09T14:04:50Z","body":"Hi, I've found another issue.\r\n\r\ncode within cfscript tags should not be beautified OR else be beautified with a different set of rules.\r\n\r\nThe following code becomes invalid when beautified:\r\n\r\n```cfm\r\n<cfscript>\r\n  /**\r\n  * Calculate a CRC-16 checksum for a string. CRC should not be used\r\n  * for encryption, but may be suitable for data validation purposes.\r\n  *\r\n  * This ColdFusion function is based on a JavaScript function found\r\n  * at this URL: HTTP://WWW.digsys.se/JS_crc.HTML . The following\r\n  * notice is required by the authors of the original function:\r\n  *\r\n  * Copyright (c) 1989 AnDan Software. You may use this program, or\r\n  * code or tables extracted from it, as long as this notice is not\r\n  * removed or changed.\r\n  *\r\n  * @param str              string (Required)\r\n  * @return a string representing a hexadecimal number between 0000\r\n  * and FFFF\r\n  * @author Matthew Walker, .eswsoftware.com\r\n  * @version 1, 2004-06-28\r\n  */\r\n\r\n  function crc16(str) {\r\n\r\n    var Crc16Tab = listToArray('0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920');\r\n    \r\n    var n = 1;\r\n    var length=len(str);\r\n    var crc = 0;\r\n    var ch = \"\";\r\n    \r\n    if ( not structKeyExists(request, \"eswsoftware\") )\r\n      request.eswsoftware = structNew();\r\n    if ( not structKeyExists(request.eswsoftware, \"crc16\") )\r\n      request.eswsoftware.crc16 = structNew();  \r\n    request.eswsoftware.crc16.version = 1;\r\n\r\n    for ( ; n lte length ; n = n + 1 ) {\r\n      ch = mid(str, n, 1);\r\n            \r\n      crc = bitAnd(\r\n        bitXor( \r\n          bitShlN(crc, 8),\r\n          Crc16Tab[\r\n            1\r\n            + bitAnd(\r\n              bitXor(\r\n                bitShrN(crc, 8),\r\n                asc(ch)\r\n              ),\r\n              255\r\n            )\r\n          ]\r\n        ),\r\n      65535);\r\n    }\r\n    return formatBaseN(crc, 16);\r\n\r\n  }\r\n</cfscript>\r\n```\r\n\r\nit becomes:\r\n\r\n```cfm\r\n<cfscript>\r\n    /** * Calculate a CRC-16 checksum for a string. CRC should not be used * for\r\n    encryption, but may be suitable for data validation purposes. * * This\r\n    ColdFusion function is based on a JavaScript function found * at this URL:\r\n    HTTP://WWW.digsys.se/JS_crc.HTML . The following * notice is required by the\r\n    authors of the original function: * * Copyright (c) 1989 AnDan Software. You may\r\n    use this program, or * code or tables extracted from it, as long as this notice\r\n    is not * removed or changed. * * @param str string (Required) * @return a string\r\n    representing a hexadecimal number between 0000 * and FFFF * @author Matthew\r\n    Walker, .eswsoftware.com * @version 1, 2004-06-28 */ function crc16(str) { var\r\n    Crc16Tab =\r\n    listToArray('0,4129,8258,12387,16516,20645,24774,28903,33032,37161,41290,45419,49548,53677,57806,61935,4657,528,12915,8786,21173,17044,29431,25302,37689,33560,45947,41818,54205,50076,62463,58334,9314,13379,1056,5121,25830,29895,17572,21637,42346,46411,34088,38153,58862,62927,50604,54669,13907,9842,5649,1584,30423,26358,22165,18100,46939,42874,38681,34616,63455,59390,55197,51132,18628,22757,26758,30887,2112,6241,10242,14371,51660,55789,59790,63919,35144,39273,43274,47403,23285,19156,31415,27286,6769,2640,14899,10770,56317,52188,64447,60318,39801,35672,47931,43802,27814,31879,19684,23749,11298,15363,3168,7233,60846,64911,52716,56781,44330,48395,36200,40265,32407,28342,24277,20212,15891,11826,7761,3696,65439,61374,57309,53244,48923,44858,40793,36728,37256,33193,45514,41451,53516,49453,61774,57711,4224,161,12482,8419,20484,16421,28742,24679,33721,37784,41979,46042,49981,54044,58239,62302,689,4752,8947,13010,16949,21012,25207,29270,46570,42443,38312,34185,62830,58703,54572,50445,13538,9411,5280,1153,29798,25671,21540,17413,42971,47098,34713,38840,59231,63358,50973,55100,9939,14066,1681,5808,26199,30326,17941,22068,55628,51565,63758,59695,39368,35305,47498,43435,22596,18533,30726,26663,6336,2273,14466,10403,52093,56156,60223,64286,35833,39896,43963,48026,19061,23124,27191,31254,2801,6864,10931,14994,64814,60687,56684,52557,48554,44427,40424,36297,31782,27655,23652,19525,15522,11395,7392,3265,61215,65342,53085,57212,44955,49082,36825,40952,28183,32310,20053,24180,11923,16050,3793,7920');\r\n    var n = 1; var length=len(str); var crc = 0; var ch = \"\"; if ( not\r\n    structKeyExists(request, \"eswsoftware\") ) request.eswsoftware = structNew(); if\r\n    ( not structKeyExists(request.eswsoftware, \"crc16\") ) request.eswsoftware.crc16\r\n    = structNew(); request.eswsoftware.crc16.version = 1; for ( ; n lte length ; n =\r\n    n + 1 ) { ch = mid(str, n, 1); crc = bitAnd( bitXor( bitShlN(crc, 8), Crc16Tab[\r\n    1 + bitAnd( bitXor( bitShrN(crc, 8), asc(ch) ), 255 ) ] ), 65535); } return\r\n    formatBaseN(crc, 16); }\r\n</cfscript>\r\n```\r\n\r\n\r\n"}}