|
|
|
@ -23,7 +23,7 @@ const tokenize = string => { |
|
|
|
|
const injectTitle = (deck, meta) => { |
|
|
|
|
const title = []; |
|
|
|
|
|
|
|
|
|
if (meta.title) |
|
|
|
|
if (meta?.title) |
|
|
|
|
title.push({ |
|
|
|
|
type : "heading", |
|
|
|
|
level : 1, |
|
|
|
@ -34,7 +34,7 @@ const injectTitle = (deck, meta) => { |
|
|
|
|
} |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
if (meta.author) |
|
|
|
|
if (meta?.author) |
|
|
|
|
title.push({ |
|
|
|
|
type : "paragraph", |
|
|
|
|
tokens : [ |
|
|
|
@ -44,7 +44,7 @@ const injectTitle = (deck, meta) => { |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
if (meta.email) |
|
|
|
|
if (meta?.email) |
|
|
|
|
title.push({ |
|
|
|
|
type : "paragraph", |
|
|
|
|
tokens : [ |
|
|
|
@ -54,9 +54,12 @@ const injectTitle = (deck, meta) => { |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
}); |
|
|
|
|
const slide = new Slide(title); |
|
|
|
|
slide.title = true; |
|
|
|
|
deck.unshift(slide); |
|
|
|
|
|
|
|
|
|
if (title.length > 0) { |
|
|
|
|
const slide = new Slide(title); |
|
|
|
|
slide.title = true; |
|
|
|
|
deck.unshift(slide); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return deck; |
|
|
|
|
} |
|
|
|
|