[ https://issues.apache.org/jira/browse/DOXIA-767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17909864#comment-17909864 ]
Konrad Windszus commented on DOXIA-767: --------------------------------------- It seems also that newlines within {{Sink.text(String text)}} are not properly escaped in all Sinks. In order to make them appear as newlines in HTML one has to use {{<br>}} or {{\}} for Markdown, however this is not the case in https://github.com/apache/maven-doxia/blob/99e7e1fc420f16941ca6c61720e8bc2549f2f563/doxia-core/src/main/java/org/apache/maven/doxia/sink/impl/Xhtml5BaseSink.java#L1460. Similarly newlines in HTML text need to be converted to spaces in https://github.com/apache/maven-doxia/blob/99e7e1fc420f16941ca6c61720e8bc2549f2f563/doxia-core/src/main/java/org/apache/maven/doxia/parser/AbstractXmlParser.java#L474 (which isn't the case for XHTML at least). > Clarify block vs inline semantics with regards to whitespaces in Sink API > ------------------------------------------------------------------------- > > Key: DOXIA-767 > URL: https://issues.apache.org/jira/browse/DOXIA-767 > Project: Maven Doxia > Issue Type: Task > Components: Documentation > Reporter: Konrad Windszus > Priority: Major > > The javadoc of > https://maven.apache.org/doxia/doxia/doxia-sink-api/apidocs/org/apache/maven/doxia/sink/Sink.html > should be clarified with regards to trimming whitespace behaviour for > block/inline elements. Not necessarily each block Sink element is a block > element in the desired output format (e.g. XHTML). Most prominently this is > the case with > {{Sink.verbatim(Decoration:source)}} which is a block element in Sink API but > opens an inline element ({{<pre><code>}}) in XHTML. -- This message was sent by Atlassian Jira (v8.20.10#820010)