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 1.2.1 / 2014-10-28
------------------ ------------------

2
Makefile

@ -72,5 +72,5 @@ todo:
grep 'TODO' -n -r ./lib 2>/dev/null || test true 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 .SILENT: help lint test todo

34
README.md

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

4
demo/index.html

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

4
demo/sample.md

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

Loading…
Cancel
Save