Fix blank p tags after p tag, before pre

Also process p tags, and strip off new line.
This commit is contained in:
Daniel Siepmann 2019-11-21 16:00:22 +01:00
parent d158e2f761
commit 9d39eac0b9

View file

@ -45,32 +45,25 @@ 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 externalBlocks = blockquote, div, dd, dl, ol, ul, pre, p
externalBlocks { externalBlocks {
ol { ol {
stripNL = 1 stripNL = 1
stdWrap.parseFunc = < lib.parseFunc stdWrap.parseFunc = < lib.parseFunc
} }
ul { ul < .ol
stripNL = 1
stdWrap.parseFunc = < lib.parseFunc
}
pre { pre {
stripNl = 1
stdWrap.parseFunc < lib.parseFunc stdWrap.parseFunc < lib.parseFunc
} }
div { div {
stripNL = 1 stripNL = 1
callRecursive = 1 callRecursive = 1
} }
article < .div
aside < .div
blockquote < .div blockquote < .div
footer < .div
header < .div
nav < .div
section < .div
dl < .div dl < .div
dd < .div dd < .div
p < .div
} }
plainTextStdWrap { plainTextStdWrap {
replacement { replacement {
@ -91,7 +84,7 @@ lib.parseFunc_RTE {
} }
nonTypoTagStdWrap { nonTypoTagStdWrap {
encapsLines { encapsLines {
encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt encapsTagList = p,h1,h2,h3,h4,h5,h6,hr,dt
remapTag.DIV = P remapTag.DIV = P
nonWrappedTag = P nonWrappedTag = P
innerStdWrap_all.ifBlank = &nbsp; innerStdWrap_all.ifBlank = &nbsp;