List,

My understanding of start/stop macros such as \startparagraph...\stopparagraph has been that blank lines are allowed between the block of text and the macros, as

\startparagraph

This is the text of the paragraph

\stopparagraph

However, in xml exports the blank line before \stopparagraph leads to spurious break elements in some circumstances, as shown in the following:

\setupbackend     [export=yes,xhtml=yes]
\starttext
\startsection[title=trailing blank line]
\startparagraph
  Xxx xxxxxxxxxxx xx xxxxxxxxx xxxxxx xxx xxxxxxxx xx xxxxxxxxxx
  xxxxxx. Xxx xxxxxxxx xxxxx, \inleft{z} xxxxx xxxxxxxx xx xxxxxxxxx
  xx xxxx xxxxxxxxx xx xxxxxxx xxxx xx xxxxx, xxx xxxx xxxxxxxx xx
  xxx xxxxxxx xxxxxxx xx xxxxxxxx xxx xxxxxxxx xx Xxxxxxxx xxxx, xxx
  xxxx xxxx xxxxxxxxx xx xxxxxxxx xxxxx xxxxxx xxxx. Xxx xxxxxxxxx
  xxxxxxx xxx xxx xxxxxxxxxx xx xxxxxxxx xxxx xxxxxxx,xxxxxxxxx
  xxxxxx x xxxxxx, xxxxxxxx xxx xxxxxxxxxxx xxx xxxxx xxxx. Xxxx xxx
  xxxxxx xx xxx xxxxxxx xxxx, xxxxxxxx xxxx xxxx xxx xxxxxxxxx xx
  xxxxx xxxxxxxxx, xxx xxx xxxxx xxx xxxxxxxxxxx xx xxxxxx xxxxxx
  \inleft{zz}. Xxxxxxxx xxxx xxxxx xx xxxx xxxxxxxx (xxxxx, xxxxxxx,
  xx xxx xxxxxx).

\stopparagraph

\stopsection

\startsection[title=no blank line]

\startparagraph
  Xxx xxxxxxxxxxx xx xxxxxxxxx xxxxxx xxx xxxxxxxx xx xxxxxxxxxx
  xxxxxx. Xxx xxxxxxxx xxxxx, \inleft{z} xxxxx xxxxxxxx xx xxxxxxxxx
  xx xxxx xxxxxxxxx xx xxxxxxx xxxx xx xxxxx, xxx xxxx xxxxxxxx xx
  xxx xxxxxxx xxxxxxx xx xxxxxxxx xxx xxxxxxxx xx Xxxxxxxx xxxx, xxx
  xxxx xxxx xxxxxxxxx xx xxxxxxxx xxxxx xxxxxx xxxx. Xxx xxxxxxxxx
  xxxxxxx xxx xxx xxxxxxxxxx xx xxxxxxxx xxxx xxxxxxx,xxxxxxxxx
  xxxxxx x xxxxxx, xxxxxxxx xxx xxxxxxxxxxx xxx xxxxx xxxx. Xxxx xxx
  xxxxxx xx xxx xxxxxxx xxxx, xxxxxxxx xxxx xxxx xxx xxxxxxxxx xx
  xxxxx xxxxxxxxx, xxx xxx xxxxx xxx xxxxxxxxxxx xx xxxxxx xxxxxx
  \inleft{zz}. Xxxxxxxx xxxx xxxxx xx xxxx xxxxxxxx (xxxxx, xxxxxxx,
  xx xxx xxxxxx).
\stopparagraph

\stopsection

\startsection[title=Another section]

\startparagraph

  This is here to show the bottom of the previous section.

\stopparagraph

\stopsection

\stoptext

Note that the pdf output does not display the problem, but the pdf output is not why one runs an export. The breaks disappear in shorter paragraphs, and disappear when the margintext is not present, but appear when margintext is present and the paragraph exceeds some length which I have not worked to determine.

Is my understanding of the space rules incorrect, or is this a bug?

Since some breaks perhaps should be present, it is difficult to remove these with CSS, or XSLT. One thing that might help is to add a class identifier to breaks indicating what lead to their creation. Of course, not generating these would be better still.

--

Rik