myst-frontmatter
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -15,2 +15,4 @@ "use strict"; | ||
'title', | ||
'subtitle', | ||
'short_title', | ||
'description', | ||
@@ -40,4 +42,2 @@ 'authors', | ||
exports.PAGE_FRONTMATTER_KEYS = [ | ||
'subtitle', | ||
'short_title', | ||
'kernelspec', | ||
@@ -432,2 +432,8 @@ 'jupytext', | ||
} | ||
if ((0, simple_validators_1.defined)(value.short_title)) { | ||
output.short_title = (0, simple_validators_1.validateString)(value.short_title, Object.assign(Object.assign({}, (0, simple_validators_1.incrementOptions)('short_title', opts)), { maxLength: 40 })); | ||
} | ||
if ((0, simple_validators_1.defined)(value.subtitle)) { | ||
output.subtitle = (0, simple_validators_1.validateString)(value.subtitle, (0, simple_validators_1.incrementOptions)('subtitle', opts)); | ||
} | ||
if ((0, simple_validators_1.defined)(value.authors)) { | ||
@@ -562,8 +568,2 @@ let authors = value.authors; | ||
const output = validateProjectFrontmatterKeys(value, opts); | ||
if ((0, simple_validators_1.defined)(value.subtitle)) { | ||
output.subtitle = (0, simple_validators_1.validateString)(value.subtitle, (0, simple_validators_1.incrementOptions)('subtitle', opts)); | ||
} | ||
if ((0, simple_validators_1.defined)(value.short_title)) { | ||
output.short_title = (0, simple_validators_1.validateString)(value.short_title, Object.assign(Object.assign({}, (0, simple_validators_1.incrementOptions)('short_title', opts)), { maxLength: 40 })); | ||
} | ||
if ((0, simple_validators_1.defined)(value.kernelspec)) { | ||
@@ -570,0 +570,0 @@ output.kernelspec = validateKernelSpec(value.kernelspec, (0, simple_validators_1.incrementOptions)('kernelspec', opts)); |
@@ -9,2 +9,4 @@ import doi from 'doi-utils'; | ||
'title', | ||
'subtitle', | ||
'short_title', | ||
'description', | ||
@@ -34,4 +36,2 @@ 'authors', | ||
export const PAGE_FRONTMATTER_KEYS = [ | ||
'subtitle', | ||
'short_title', | ||
'kernelspec', | ||
@@ -417,2 +417,8 @@ 'jupytext', | ||
} | ||
if (defined(value.short_title)) { | ||
output.short_title = validateString(value.short_title, Object.assign(Object.assign({}, incrementOptions('short_title', opts)), { maxLength: 40 })); | ||
} | ||
if (defined(value.subtitle)) { | ||
output.subtitle = validateString(value.subtitle, incrementOptions('subtitle', opts)); | ||
} | ||
if (defined(value.authors)) { | ||
@@ -545,8 +551,2 @@ let authors = value.authors; | ||
const output = validateProjectFrontmatterKeys(value, opts); | ||
if (defined(value.subtitle)) { | ||
output.subtitle = validateString(value.subtitle, incrementOptions('subtitle', opts)); | ||
} | ||
if (defined(value.short_title)) { | ||
output.short_title = validateString(value.short_title, Object.assign(Object.assign({}, incrementOptions('short_title', opts)), { maxLength: 40 })); | ||
} | ||
if (defined(value.kernelspec)) { | ||
@@ -553,0 +553,0 @@ output.kernelspec = validateKernelSpec(value.kernelspec, incrementOptions('kernelspec', opts)); |
@@ -69,5 +69,5 @@ import type { CreditRole } from 'credit-roles'; | ||
title?: string; | ||
description?: string; | ||
subtitle?: string; | ||
short_title?: string; | ||
description?: string; | ||
authors?: Author[]; | ||
@@ -74,0 +74,0 @@ venue?: Venue; |
{ | ||
"name": "myst-frontmatter", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"sideEffects": false, | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet