Fix parsing of HTML in frontend

Process a-Tags.
Do not mark p-Tag as external block, otherwise processing would need to
be defined.
This commit is contained in:
Daniel Siepmann 2020-01-16 10:49:53 +01:00
parent 4440571952
commit 946a70bf05

View file

@ -4,13 +4,30 @@ lib.parseFunc {
makelinks { makelinks {
http { http {
keep = {$styles.content.links.keep} keep = {$styles.content.links.keep}
extTarget = {$styles.content.links.extTarget} extTarget = _blank
} }
mailto { mailto {
keep = path keep = path
} }
} }
tags { tags {
a = TEXT
a {
current = 1
typolink {
parameter.data = parameters:href
title.data = parameters:title
ATagParams.data = parameters:allParams
# the target attribute takes precedence over config.intTarget
target.ifEmpty.data = parameters:target
# the target attribute takes precedence over the constant (styles.content.links.extTarget)
# which takes precedence over config.extTarget
# do not pass extTarget as reference, as it might not be set resulting in the string being
# written to the target attribute
extTarget.ifEmpty < config.extTarget
extTarget.override.data = parameters:target
}
}
pre = USER pre = USER
pre { pre {
userFunc = DanielSiepmann\DsSite\UserFunction\CodeHighlighting->preTag userFunc = DanielSiepmann\DsSite\UserFunction\CodeHighlighting->preTag
@ -33,7 +50,7 @@ lib.parseFunc {
lib.parseFunc_RTE < lib.parseFunc lib.parseFunc_RTE < lib.parseFunc
lib.parseFunc_RTE { lib.parseFunc_RTE {
# Processing <ol>, <ul> and <table> blocks separately # Processing <ol>, <ul> and <table> blocks separately
externalBlocks = blockquote, div, dd, dl, ol, ul, pre, p externalBlocks = blockquote, div, dd, dl, ol, ul, pre
externalBlocks { externalBlocks {
ol { ol {
stripNL = 1 stripNL = 1