mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
All: Don't render empty title page for Fountain (#10631)
This commit is contained in:
parent
818f9f58d1
commit
0ec917bb96
@ -107,12 +107,19 @@ const pluginAssets = function() {
|
|||||||
function renderFountainScript(markdownIt: any, content: string) {
|
function renderFountainScript(markdownIt: any, content: string) {
|
||||||
const result = fountain.parse(content);
|
const result = fountain.parse(content);
|
||||||
|
|
||||||
return `
|
let titlePageHtml = '';
|
||||||
<div class="fountain joplin-editable">
|
if (result.html.title_page) {
|
||||||
<pre class="joplin-source" data-joplin-language="fountain" data-joplin-source-open="\`\`\`fountain " data-joplin-source-close=" \`\`\` ">${markdownIt.utils.escapeHtml(content)}</pre>
|
titlePageHtml = `
|
||||||
<div class="title-page">
|
<div class="title-page">
|
||||||
${result.html.title_page}
|
${result.html.title_page}
|
||||||
</div>
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
return `
|
||||||
|
<div class="fountain joplin-editable">
|
||||||
|
<pre class="joplin-source" data-joplin-language="fountain" data-joplin-source-open="\`\`\`fountain " data-joplin-source-close=" \`\`\` ">${markdownIt.utils.escapeHtml(content)}</pre>
|
||||||
|
${titlePageHtml}
|
||||||
<div class="page">
|
<div class="page">
|
||||||
${result.html.script}
|
${result.html.script}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user