Methods

(inner) yaml(text, looseDirectivesopt) → {Object|false}

Parse text as YAML by using js-yaml's FAILSAFE_SCHEMA.

Parameters:
NameTypeAttributesDefaultDescription
textString

Target text.

looseDirectivesboolean | Array.<string><optional>
false

By setting true, it try to parse as loose YAML only in defined Marpit built-in directives. You may also extend target keys for loose parsing by passing an array of strings.

Returns:

Return parse result, or false when failed to parse.

Type: 
Object | false