Respect paragraphs in abstract when rendering

This commit is contained in:
Daniel Siepmann 2020-01-16 15:53:29 +01:00
parent 6f0751268e
commit f404b174cc
2 changed files with 32 additions and 14 deletions

View file

@ -1,3 +1,17 @@
temp.removeBlankLines {
search = #\r\n\r\n#
replace {
cObject = COA
cObject {
1 = TEXT
1.char = 13
2 = TEXT
2.char = 10
}
}
useRegExp = 1
}
# Creates persistent ParseFunc setup for non-HTML content. # Creates persistent ParseFunc setup for non-HTML content.
lib.parseFunc { lib.parseFunc {
makelinks = 1 makelinks = 1
@ -72,19 +86,7 @@ lib.parseFunc_RTE {
plainTextStdWrap { plainTextStdWrap {
replacement { replacement {
10 { 10 < temp.removeBlankLines
search = #\r\n\r\n#
replace {
cObject = COA
cObject {
1 = TEXT
1.char = 13
2 = TEXT
2.char = 10
}
}
useRegExp = 1
}
11 { 11 {
search = #\r\n# search = #\r\n#
replace = replace =
@ -107,3 +109,19 @@ lib.parseFunc_RTE {
} }
} }
} }
lib.parseFunc_abstract < lib.parseFunc
lib.parseFunc_abstract {
plainTextStdWrap {
replacement {
10 < temp.removeBlankLines
}
}
nonTypoTagStdWrap {
encapsLines {
encapsTagList = p
nonWrappedTag = P
}
}
}

View file

@ -9,7 +9,7 @@
})} })}
<main> <main>
{page.data.abstract -> f:format.html()} {page.data.abstract -> f:format.html(parseFuncTSPath: 'lib.parseFunc_abstract')}
<f:if condition="{page.media.0}"> <f:if condition="{page.media.0}">
{f:render(partial: 'Image', arguments: {image: page.media.0})} {f:render(partial: 'Image', arguments: {image: page.media.0})}