0.1.15 • Published 3 years ago

flavored-markdown v0.1.15

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

Flavored markdown

Command line tool that output HTML from a github flavored markdown file.

Installation:

npm install -g flavored-markdown

Or

npm install flavored-markdown

Global Usage:

flavored-markdown < markdown.md > markdown.html

Or for better file escaping text

flavored-markdown "$(< markdown.md)" > markdown.html

Or

flavored-markdown "Some *markdown*" > markdown.html

Library usage:

import Markdown from 'flavored-markdown'
const markdown = new Markdown()
markdown.html("some *markdown*").then(html => console.log(html))

If you want a full html with html tag and css in the header:

import Markdown from 'flavored-markdown'
const markdown = new Markdown(true)
markdown.html("some *markdown*").then(html => console.log(html))

Contribute

You can find this project at this GitHub repository

How to use with VIM

In your vimrc or gvimrc:

"Convert to html when save .md files
autocmd BufWritePost *.md :silent !flavored-markdown < '%:p' > /var/tmp/markdown.html

"Show the results with F9 key
autocmd BufNewFile,Bufread *.md imap <F9> <esc>:!google-chrome /var/tmp/markdown.html<cr>i
autocmd BufNewFile,Bufread *.md map <F9> :!google-chrome /var/tmp/markdown.html<cr>

"put a marker in char 80
autocmd BufNewFile,Bufread *.md set cc=80

This automatically create a temporary file /var/tmp/markdown.html when you save your .md files.

Syntax highlighting

If you are a VIM user and you want syntax highlighting or matching rules for Markdowns, look at this project.

0.1.13

3 years ago

0.1.14

3 years ago

0.1.15

3 years ago

0.1.12

10 years ago

0.1.11

10 years ago

0.1.10

10 years ago

0.1.9

10 years ago

0.1.8

10 years ago

0.1.7

10 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago