Updated README with new inclusion syntax

This commit is contained in:
Titus 2012-06-20 21:19:56 -06:00
parent 05453b5042
commit 22056db9a7

View File

@ -116,22 +116,23 @@ Showdown allows additional functionality to be loaded via extensions.
<script src="src/showdown.js" />
<script src="src/extensions/twitter.js" />
var converter = new Showdown().converter({
extensions: [
Showdown.extensions.twitter
]
})
var converter = new Showdown().converter({ extensions: 'twitter' });
```
### Server-side Extension Usage
```js
// Using a bundled extension
var Showdown = require('showdown');
var twitter = Showdown.extensions.twitter;
var converter = new Showdown().converter({ extensions: [twitter] });
var converter = new Showdown().converter({ extensions: ['twitter'] });
// Using a custom extension
var mine = require('./custom-extensions/mine');
var converter = new Showdown().converter({ extensions: ['twitter', mine] });
```
Known Differences in Output
---------------------------