(markdown, opts = {})
| 274 | } |
| 275 | |
| 276 | function frontmatter(markdown, opts = {}) { |
| 277 | const defaults = { |
| 278 | schema, |
| 279 | validateKeyNames: true, |
| 280 | validateKeyOrder: false, // TODO: enable this once we've sorted all the keys. See issue 9658 |
| 281 | } |
| 282 | |
| 283 | return parse(markdown, Object.assign({}, defaults, opts)) |
| 284 | } |
| 285 | |
| 286 | // attach the schema object so it can be `require`d elsewhere. |
| 287 | frontmatter.schema = schema |
no test coverage detected