Skip to content

Commit

Permalink
Merge branch 'develop' into feat/910-auto-linking-mention-from-html-t…
Browse files Browse the repository at this point in the history
…o-markdown
  • Loading branch information
tivie committed Apr 16, 2022
2 parents 3c2e25a + 1cf1908 commit 947ec9b
Show file tree
Hide file tree
Showing 10 changed files with 1,047 additions and 2 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,19 @@ var showdown = require('showdown'),
converter = new showdown.Converter({ extensions: ['myExtension'] });
```
## Building
Building your clone of the repository is easy.
> Prerequesites: [Node.js](https://nodejs.org/) v12, [npm](https://www.npmjs.com/package/npm) and [npx](https://www.npmjs.com/package/npx) must be installed.
1. run `npm install`.
2. run `npx grunt build` (see [`Gruntfile.js`](/Gruntfile.js)). This command:
1. Cleans the repo.
2. Checks code quality ([JSHint](https://jshint.com/) and [ESLint](https://eslint.org/)).
3. Runs tests.
4. Creates the [distributable](/showdown.js) and [minified](/showdown.min.js) files in the [`dist`](/dist) folder.
## Tests
A suite of tests is available which require Node.js. Once Node is installed, run the following command from
Expand Down
Binary file added docs/assets/markdown-editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 19 additions & 1 deletion docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,4 +150,22 @@ showdown makehtml [options]

```sh
showdown makehtml -e ~/twitter.js -e ~/youtube.js
```
```

## Extra options

You can specify any of the [supported options](available-options.md), and they will be passed to the converter.
For example, you can enable strikethrough support via the following command:

```
showdown makehtml -i foo.md -o bar.html --strikethrough
```

this command is equivalent of doing:

```js
var conv = new showdown.Converter({strikethrough: true});
```

!!! warning ""
In the CLI tool, all the extra options are **disabled** by default. This is the opposite of what is defined for node and browser, where some options, like `ghCodeBlocks` are enabled (for backward compatibility and historical reasons).
24 changes: 24 additions & 0 deletions docs/extensions-list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Official

* [twitter-extension][1] - Adds support of Twitter usernames and hastags
* [prettify-extension][2] - Adds [Google Prettify][3] hints to HTML output

## Community

* [showdown-icon][4] - Adds support of Glyphicon and font-awesome into Markdown
* [showdown-xss-filter][5] - Filters XSS, using leizongmin/js-xss
* [showdown-toc][6] - Adds Table of Contents
* [showdown-footnotes][7] - Adds simple footnotes
* [katex-latex][8] - Displays math using KaTeX and LaTeX or AsciiMath

!!! note ""
If you have a Showdown extension you would like to add here, you can [raise an issue](https://github.com/showdownjs/showdown/issues).

[1]: https://github.com/showdownjs/twitter-extension
[2]: https://github.com/showdownjs/prettify-extension
[3]: https://github.com/googlearchive/code-prettify
[4]: https://github.com/dbtek/showdown-icon
[5]: https://github.com/VisionistInc/showdown-xss-filter
[6]: https://github.com/ravisorg/showdown-toc
[7]: https://github.com/Kriegslustig/showdown-footnotes
[8]: https://obedm503.github.io/showdown-katex
Loading

0 comments on commit 947ec9b

Please sign in to comment.