---
title: This is a title!
name: Derek Worthen
age: young
contact:
email: email@domain.com
address: some location
pets:
- cat
- dog
- bat
match: !!js/regexp /pattern/gim
run: !!js/function function() { }
---
- item
- item
- item
1. one
2. two
2. three
Expected Output
This is from Pandoc.
---
title: "This is a title!"
name: Derek Worthen
age: young
contact: null
email: "email@domain.com"
address: some location
pets:
- cat
- dog
- bat
match: !<tag:yaml.org,2002:js/regexp> /pattern/gmi
run: !<tag:yaml.org,2002:js/function> "function () {\n \n}"
---
- item
- item
- item
1. one
2. two
3. three
Current Output
It errors.
could not determine a constructor for the tag tag:yaml.org,2002:js/regexp
on line 12, column 8
at ConstructorError.YAMLError (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/errors.js:70:46)
at ConstructorError.MarkedYAMLError (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/errors.js:90:45)
at new ConstructorError (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:17:53)
at Constructor.Constructor.construct_undefined (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:550:13)
at Constructor.BaseConstructor.BaseConstructor.construct_object (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:133:28)
at Constructor.BaseConstructor.BaseConstructor.construct_mapping (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:173:22)
at Constructor.Constructor.construct_mapping (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:294:54)
at /Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:521:23
at Constructor.BaseConstructor.BaseConstructor.construct_document (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:88:41)
at Constructor.BaseConstructor.BaseConstructor.get_single_data (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/constructor.js:79:21)
at Object.load (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/node_modules/yaml-js/lib/yaml.js:112:20)
at parse (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/index.js:28:27)
at extractor (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/node_modules/front-matter/index.js:21:34)
at module.exports (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/tidy-markdown/lib/index.js:304:15)
at module.exports.TidyMarkdown.beautify (/Users/glavin/Documents/Project Dev/atom-beautify/src/beautifiers/tidy-markdown.coffee:13:29)
at tryCatcher (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/bluebird/js/main/util.js:24:31)
at Promise.module.exports.Promise._resolveFromResolver (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/bluebird/js/main/promise.js:427:31)
at new Promise (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/bluebird/js/main/promise.js:53:37)
at TidyMarkdown.module.exports.TidyMarkdown.beautify (/Users/glavin/Documents/Project Dev/atom-beautify/src/beautifiers/tidy-markdown.coffee:11:20)
at module.exports.Beautifiers.beautify (/Users/glavin/Documents/Project Dev/atom-beautify/src/beautifiers/index.coffee:163:28)
at tryCatcher (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/bluebird/js/main/util.js:24:31)
at Promise.module.exports.Promise._resolveFromResolver (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/bluebird/js/main/promise.js:427:31)
at new Promise (/Users/glavin/Documents/Project Dev/atom-beautify/node_modules/bluebird/js/main/promise.js:53:37)
at Beautifiers.module.exports.Beautifiers.beautify (/Users/glavin/Documents/Project Dev/atom-beautify/src/beautifiers/index.coffee:100:20)
at beautify-languages-spec.coffee:155:40
Input
Expected Output
This is from Pandoc.
Current Output
It errors.
/cc https://github.com/Glavin001/atom-beautify/issues/292