mirror of
https://github.com/twbs/bootstrap.git
synced 2022-11-09 12:25:43 -05:00
Replaces markdown.js with [remarkable](https://github.com/jonschlinkert/remarkable).
- remarkable has 100% support for [commonmark](http://jgm.github.io/CommonMark/spec.html) - [faster](https://github.com/jonschlinkert/remarkable/tree/master/benchmark) - easier to monkeypatch. this is a goal of ours, might be useful to you at some point given the custom tokenizing/parsing you're doing for documentation.
This commit is contained in:
parent
bab3679d10
commit
3e9b461766
3 changed files with 6 additions and 4 deletions
|
@ -295,7 +295,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h2 id="buttons">Buttons</h2>
|
<h2 id="buttons">Buttons</h2>
|
||||||
<p>For each of Bootstrap's buttons, define text, background and border color.</p>
|
<p>For each of Bootstrap's buttons, define text, background and border color.</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="bs-customizer-input">
|
<div class="bs-customizer-input">
|
||||||
<label for="input-@btn-font-weight">@btn-font-weight</label>
|
<label for="input-@btn-font-weight">@btn-font-weight</label>
|
||||||
|
|
|
@ -6,11 +6,13 @@
|
||||||
*/
|
*/
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var markdown = require('markdown').markdown;
|
var Remarkable = require('remarkable');
|
||||||
|
|
||||||
function markdown2html(markdownString) {
|
function markdown2html(markdownString) {
|
||||||
|
var md = new Remarkable();
|
||||||
|
|
||||||
// the slice removes the <p>...</p> wrapper output by Markdown processor
|
// the slice removes the <p>...</p> wrapper output by Markdown processor
|
||||||
return markdown.toHTML(markdownString.trim()).slice(3, -4);
|
return md.render(markdownString.trim()).slice(3, -5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
"grunt-saucelabs": "~8.3.2",
|
"grunt-saucelabs": "~8.3.2",
|
||||||
"grunt-sed": "~0.1.1",
|
"grunt-sed": "~0.1.1",
|
||||||
"load-grunt-tasks": "~1.0.0",
|
"load-grunt-tasks": "~1.0.0",
|
||||||
"markdown": "~0.5.0",
|
|
||||||
"npm-shrinkwrap": "~4.0.0",
|
"npm-shrinkwrap": "~4.0.0",
|
||||||
|
"remarkable": "^1.2.0",
|
||||||
"time-grunt": "~1.0.0"
|
"time-grunt": "~1.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
Loading…
Reference in a new issue