{"id":20313275,"url":"https://github.com/showdownjs/prettify-extension","last_synced_at":"2025-04-11T16:51:53.951Z","repository":{"id":25363836,"uuid":"28791736","full_name":"showdownjs/prettify-extension","owner":"showdownjs","description":"Prettify extension for Showdown.js","archived":false,"fork":false,"pushed_at":"2016-01-06T02:44:39.000Z","size":22,"stargazers_count":20,"open_issues_count":3,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-09T13:14:40.818Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/showdownjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-05T01:13:28.000Z","updated_at":"2024-03-10T08:22:49.000Z","dependencies_parsed_at":"2022-09-06T22:21:53.961Z","dependency_job_id":null,"html_url":"https://github.com/showdownjs/prettify-extension","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/showdownjs%2Fprettify-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/showdownjs%2Fprettify-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/showdownjs%2Fprettify-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/showdownjs%2Fprettify-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/showdownjs","download_url":"https://codeload.github.com/showdownjs/prettify-extension/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248443117,"owners_count":21104342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T18:10:17.264Z","updated_at":"2025-04-11T16:51:53.927Z","avatar_url":"https://github.com/showdownjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Showdown's Prettify Extension\n==========================\n\n[![Build Status](https://travis-ci.org/showdownjs/prettify-extension.svg)](https://travis-ci.org/showdownjs/prettify-extension) [![npm version](https://badge.fury.io/js/showdown-prettify.svg)](http://badge.fury.io/js/showdown-prettify) [![npm version](https://badge.fury.io/bo/showdown-prettify.svg)](http://badge.fury.io/bo/showdown-prettify)\n\n------\n\n**An extension to add [Google Prettify](http://code.google.com/p/google-code-prettify/) hints to [showdown](https://github.com/showdownjs/showdown)'s HTML output**\n\n\n## Installation\n\n### With [npm](http://npmjs.org)\n\n    npm install showdown-prettify\n\n### With [bower](http://bower.io/)\n\n    bower install showdown-prettify\n\n### Manual\n\nYou can also [download the latest release zip or tarball](https://github.com/showdownjs/prettify-extension/releases) and include it in your webpage, after showdown:\n\n    \u003cscript src=\"showdown.min.js\"\u003e\n    \u003cscript src=\"showdown-prettify.min.js\"\u003e\n\n### Enabling the extension\n\nAfter including the extension in your application, you just need to enable it in showdown.\n\n    var converter = new showdown.Converter({extensions: ['prettify']});\n\n## Example\n\n```javascript\nvar converter = new showdown.Converter({extensions: ['prettify']}),\n    input = \"Here's a simple hello world in javascript:\\n\" +\n            \"\\n\" +\n            \"    alert('Hello World!');\\n\" +\n            \"\\n\" +\n            \"The `alert` function is a build-in global from `window`.\";\n    html = converter.makeHtml(input);\n    console.log(html);\n```\n\nThis should output the equivalent to:\n\n```html\n\u003cp\u003eHere's a simple hello world in javascript:\u003c/p\u003e\n\n\u003cpre class=\"prettyprint linenums\" tabIndex=\"0\"\u003e\u003ccode data-inner=\"1\"\u003ealert('Hello World!');\n\u003c/code\u003e\u003c/pre\u003e\n\n\u003cp\u003eThe \u003ccode class=\"prettyprint\"\u003ealert\u003c/code\u003e function is a build-in global from \u003ccode class=\"prettyprint\"\u003ewindow\u003c/code\u003e.\u003c/p\u003e\n```\n\n## License\nThese files are distributed under BSD license. For more information, \nplease check the [LICENSE file](https://github.com/showdownjs/prettify-extension/blob/master/LICENSE) in the source code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshowdownjs%2Fprettify-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshowdownjs%2Fprettify-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshowdownjs%2Fprettify-extension/lists"}