Browse Source

Docs update

pull/14/head
Vitaly Puzrin 10 years ago
parent
commit
70d5ca56ca
  1. 10
      CHANGELOG.md
  2. 2
      Makefile
  3. 34
      README.md
  4. 4
      demo/index.html
  5. 4
      demo/sample.md

10
CHANGELOG.md

@ -1,3 +1,13 @@
1.2.2 / 2014-10-29
------------------
- Fixed regression from 1.2.1 for data without tailing `\n`.
- Fixed blockquote line ranges.
- Added subscript/superscript support.
- Updated CommonMark spec and updated implementation.
- Other minor changes.
1.2.1 / 2014-10-28
------------------

2
Makefile

@ -72,5 +72,5 @@ todo:
grep 'TODO' -n -r ./lib 2>/dev/null || test true
.PHONY: publish lint test dev-deps gh-pages todo demo
.PHONY: publish lint test gh-pages todo demo
.SILENT: help lint test todo

34
README.md

@ -46,8 +46,8 @@ console.log(md.render('# Remarkable rulezz!'));
### Options
By default remarkable is configured to be similar to GFM, but with HTML disabled. This is easy to change
if you prefer to use different settings.
By default remarkable is configured to be similar to GFM, but with HTML disabled.
This is easy to change if you prefer to use different settings.
There are two ways to define options.
@ -88,15 +88,16 @@ md.set({
});
```
**Note:** To achieve the best possible performance, don't modify a `Remarkable` instance on
the fly. If you need multiple configurations it's best to create multiple instances and initialize
each with a configuration that is ideal for that instance.
**Note:** To achieve the best possible performance, don't modify a `Remarkable`
instance on the fly. If you need multiple configurations it's best to create
multiple instances and initialize each with a configuration that is ideal for
that instance.
### Presets
Remarkable offers some "presets" as a convenience to quickly enable/disable active syntax rules and options
for common use cases.
Remarkable offers some "presets" as a convenience to quickly enable/disable
active syntax rules and options for common use cases.
#### commonmark
@ -109,11 +110,18 @@ var md = new Remarkable('commonmark');
#### full
Enable everything with the `full` preset:
Enable all available rules (but still with default options, if not set):
```js
var Remarkable = require('remarkable');
var md = new Remarkable('full');
// Or with options:
var md = new Remarkable('full', {
html: true,
linkify: true,
typographer: true
});
```
@ -149,15 +157,19 @@ var md = new Remarkable({
Enabled by default:
- [Tables](https://help.github.com/articles/github-flavored-markdown/#tables) (GFM)
- [\<del>](https://help.github.com/articles/github-flavored-markdown/#strikethrough) (GFM strikethrough) - `~~deleted text~~`
- [\<del>](https://help.github.com/articles/github-flavored-markdown/#strikethrough)
(GFM strikethrough) - `~~deleted text~~`
Disabled by default:
- [\<sup](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `19^th^`
- [\<sub>](http://johnmacfarlane.net/pandoc/README.html#superscripts-and-subscripts) - `H~2~0`
- __\<ins>__ - `++inserted text++` (experimental)
- __\<mark>__ - `==marked text==` (experimental)
__*__ Experimental extentions can be changed later for something like [Critic Markup](http://criticmarkup.com/), but you will
still be able to use old-style rules via external plugins if you prefer.
__*__ Experimental extentions can be changed later for something like
[Critic Markup](http://criticmarkup.com/), but you will still be able to use
old-style rules via external plugins if you prefer.
### Manage rules

4
demo/index.html

@ -163,6 +163,10 @@ _This is italic text_
~~Deleted text~~
Superscript: 19^th^
Subscript: H~2~O
++Inserted text++
==Marked text==

4
demo/sample.md

@ -56,6 +56,10 @@ _This is italic text_
~~Deleted text~~
Superscript: 19^th^
Subscript: H~2~O
++Inserted text++
==Marked text==

Loading…
Cancel
Save