markdown-styles
Advanced tools
Comparing version 1.1.3 to 1.1.4
@@ -29,2 +29,3 @@ var Transform = require('readable-stream').Transform; | ||
// at the end of input, process the whole stream | ||
this.options.meta.toc = []; | ||
@@ -34,3 +35,3 @@ this.options.meta.content = this.buffer.replace(/<(ul|ol)>/g, '<$1 class="list">') | ||
.replace(/<p><img([^>]*)>\s*<\/p>/g, '<p class="img-container"><img$1></p>') | ||
.replace(/<(h[1-5])>([^<]*)<\/h[1-5]>/g, function(match, p1, p2) { | ||
.replace(/<(h[1-5])[^>]*>([^<]*)<\/h[1-5]>/g, function(match, p1, p2) { | ||
var name = p2.toLowerCase().replace(/[^a-z0-9]/g, '_'); | ||
@@ -37,0 +38,0 @@ self.options.meta.toc.push({ title: p2, id: name }); |
{ | ||
"name": "markdown-styles", | ||
"description": "CSS stylesheets for markdown content", | ||
"version": "1.1.3", | ||
"version": "1.1.4", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Mikito Takada", |
@@ -59,2 +59,22 @@ ## Features | ||
## New! Syntax highlighting support | ||
`generate-md` supports syntax highlighting during the Markdown-to-HTML conversion process. | ||
To enable the syntax highlighting support, install `highlight.js`: | ||
npm install --save highlight.js markdown-styles | ||
Note that you need to install `markdown-styles` locally like shown above and invoke it as `./node_modules/.bin/generate-md`, so that `require('highlight.js')` will find the module we just installed locally. | ||
You will also need to include [one of the highlight.js CSS style sheets](http://softwaremaniacs.org/media/soft/highlight/test.html) in your assets folder/layout file CSS (e.g. by using a custom `--layout` file). | ||
## New! --command | ||
`--command <cmd>`: Pipe each Markdown file through a shell command and capture the output before converting. Useful for filtering the file, for example. | ||
## New! --asset-dir | ||
`--asset-dir <path>`: Normally, the asset directory is assumed to be `./assets/` in the same folder the `--layout` file is. You can override it to a different asset directory explicitly with `--asset-dir`, which is useful for builds where several directories use the same layout but different asset directories. | ||
## Metadata support | ||
@@ -82,2 +102,10 @@ | ||
## Acknowledgments | ||
I'd like to thank the authors the following CSS stylesheets: | ||
- jasonm23-dark, jasonm23-foghorn, jasonm23-markdown and jasonm23-swiss are based on https://github.com/jasonm23/markdown-css-themes by [jasonm23](https://github.com/jasonm23) | ||
- thomasf-solarizedcssdark and thomasf-solarizedcsslight are based on https://github.com/thomasf/solarized-css by [thomasf](https://github.com/thomasf) | ||
- markedapp-byword is based on the user-contributed stylesheet at http://bywordapp.com/extras/ | ||
## Screenshots of the layouts | ||
@@ -84,0 +112,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
4618396
188