{"action":"created","issue":{"url":"https://api.github.com/repos/LeaVerou/prism/issues/454","labels_url":"https://api.github.com/repos/LeaVerou/prism/issues/454/labels{/name}","comments_url":"https://api.github.com/repos/LeaVerou/prism/issues/454/comments","events_url":"https://api.github.com/repos/LeaVerou/prism/issues/454/events","html_url":"https://github.com/LeaVerou/prism/issues/454","id":53498036,"number":454,"title":"Groovy definition is broken","user":{"login":"vkbansal","id":5930351,"avatar_url":"https://avatars.githubusercontent.com/u/5930351?v=3","gravatar_id":"","url":"https://api.github.com/users/vkbansal","html_url":"https://github.com/vkbansal","followers_url":"https://api.github.com/users/vkbansal/followers","following_url":"https://api.github.com/users/vkbansal/following{/other_user}","gists_url":"https://api.github.com/users/vkbansal/gists{/gist_id}","starred_url":"https://api.github.com/users/vkbansal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vkbansal/subscriptions","organizations_url":"https://api.github.com/users/vkbansal/orgs","repos_url":"https://api.github.com/users/vkbansal/repos","events_url":"https://api.github.com/users/vkbansal/events{/privacy}","received_events_url":"https://api.github.com/users/vkbansal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-06T09:48:38Z","updated_at":"2015-01-06T19:27:21Z","closed_at":null,"body":"Try this example with prism!\r\n```groovy\r\n#!/usr/bin/env groovy\r\npackage model\r\n\r\nimport groovy.transform.CompileStatic\r\nimport java.util.List as MyList\r\n\r\ntrait Distributable {\r\n    void distribute(String version) {}\r\n}\r\n\r\n@CompileStatic\r\nclass Distribution implements Distributable {\r\n    double number = 1234.234 / 567\r\n    def otherNumber = 3 / 4\r\n    boolean archivable = condition ?: true\r\n    def ternary = a ? b : c\r\n    String name = \"Guillaume\"\r\n    Closure description = null\r\n    List<DownloadPackage> packages = []\r\n    String regex = ~/.*foo.*/\r\n    String multi = '''\r\n        multi line string\r\n    ''' + \"\"\"\r\n        now with double quotes and ${gstring}\r\n    \"\"\" + $/\r\n        even with dollar slashy strings\r\n    /$\r\n\r\n    /**\r\n     * description method\r\n     * @param cl the closure\r\n     */\r\n    void description(Closure cl) { this.description = cl }\r\n\r\n    void version(String name, Closure versionSpec) {\r\n        def closure = { println \"hi\" } as Runnable\r\n\r\n        MyList ml = [1, 2, [a: 1, b:2,c :3]]\r\n        for (ch in \"name\") {}\r\n\r\n        // single line comment\r\n        DownloadPackage pkg = new DownloadPackage(version: name)\r\n\r\n        check that: true\r\n\r\n        label:\r\n        def clone = versionSpec.rehydrate(pkg, pkg, pkg)\r\n        /*\r\n            now clone() in a multiline comment\r\n        */\r\n        clone()\r\n        packages.add(pkg)\r\n\r\n        assert 4 / 2 == 2\r\n    }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/LeaVerou/prism/issues/comments/68918529","html_url":"https://github.com/LeaVerou/prism/issues/454#issuecomment-68918529","issue_url":"https://api.github.com/repos/LeaVerou/prism/issues/454","id":68918529,"user":{"login":"Golmote","id":565460,"avatar_url":"https://avatars.githubusercontent.com/u/565460?v=3","gravatar_id":"","url":"https://api.github.com/users/Golmote","html_url":"https://github.com/Golmote","followers_url":"https://api.github.com/users/Golmote/followers","following_url":"https://api.github.com/users/Golmote/following{/other_user}","gists_url":"https://api.github.com/users/Golmote/gists{/gist_id}","starred_url":"https://api.github.com/users/Golmote/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Golmote/subscriptions","organizations_url":"https://api.github.com/users/Golmote/orgs","repos_url":"https://api.github.com/users/Golmote/repos","events_url":"https://api.github.com/users/Golmote/events{/privacy}","received_events_url":"https://api.github.com/users/Golmote/received_events","type":"User","site_admin":false},"created_at":"2015-01-06T19:27:21Z","updated_at":"2015-01-06T19:27:21Z","body":"It should be better now. See 72cde69424eed49e16f222891bad8840c06e6e7e for details.\r\n\r\nI added your example on the [examples page](http://prismjs.com/examples.html).\r\n\r\nThanks for reporting. Tell me if everything looks good to you."}}