Not by default. But you can add a rule there:
```js
var YAML = require('js-yaml')
module.exports = meta
function get(state, line) {
var pos = state.bMarks[line]
var max = state.eMarks[line]
return state.src.substr(pos, max - pos)
}
function meta(state, start, end, silent) {
if (start !== 0 || state.blkIndent !== 0) return false
if (state.tShift[start] < 0) return false
if (!get(state, start).match(/^---$/)) return false
var data = "">
for (var line = start + 1; line < end; line++) {
var str = get(state, line)
if (str.match(/^---$/)) break
if (state.tShift[line] < 0) break
data.push(str)
}
if (line >= end) return false
// or do whatever you want with it
console.log(YAML.safeLoad(data.join('\n')))
state.line = line + 1
return true
}
```
24.10.2014, 19:00, "Tom Boutell" <[email protected]>:
--Neat, I'll have to look at this. Is there support for metadata? We currently use meta-marked for that feature, which allows YAML at the top of the file to be parsed when it appears between certain delimiters.
On Wednesday, October 22, 2014 11:35:20 PM UTC-4, Vitaly Puzrin wrote:Demo: http://jonschlinkert.github.io/remarkable/demo/
Repo: https://github.com/jonschlinkert/remarkable
Everyone who tried to extend existing markdown js implementations can note, that all internal logic there is pinned with nails. That makes next to impossible to write extentions. You can patch output, but that can not guaranty correct html after processing. This can be solved by external html validators, but such solutions are heavy and possible on server only.
We decided to write a new project from scratch, to solve a lot of problems at once:
1. Users should not depend on package developpers. Parser should be extendable.
2. Flexibility should not cause speed loss.
3. Follow CommonMark spec.
4. Output should be good out of box, without additional processing.
5. Browser support :)
I think, result is interesting. All critical parts of `remarkable` are written in monomorphic style. Without sugar like "typorgafer" and "linkifier" speed is faster than in `marked` & `stmd.js` (and that's with not cheap plugins system). Also, if you don't like some extentions - it's possible to restrict processing rules by whitelist.
Now we are collecting users feedback.
Enjoy!--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/e940c721-4eca-40e5-8f92-5939d64ee1d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/80581414168377%40web8g.yandex.ru.
For more options, visit https://groups.google.com/d/optout.
- [nodejs] [ANN] remarkable - high speed markdown parser with ... Vitaly Puzrin
- [nodejs] Re: [ANN] remarkable - high speed markdown par... Tom Boutell
- Re: [nodejs] Re: [ANN] remarkable - high speed mark... Alex Kocharin
- [nodejs] Re: [ANN] remarkable - high speed markdown... Vitaly Puzrin
