Manuel Mall wrote:

"inline_border_padding_block_nested.xml". If you run the test case as is you get a "Expect inline sequence as first sequence when last paragraph is not null" message.

The first message refers to the first block in the testcase: I think this has something to do with the correct "mixing" of block and inline sequences, as the content of the inner block is placed in the first line, while it should be in the second.

The output should be:

  Before inline
  starting with a block
  after block After inline

but we get

  starting wit a block
  Before inine after block After inline

Note that the text before and after the inline (containing the nested block) appear in the same line, and this means their elements ended up in the same sequence, while they should be in two different sequences.

I'm going to look at what happens in detail ...

If you comment everything out and uncomment the last block you get a ClassCastException on a Knuth element.

This happens during LineLM.removeElementsForTrailingSpaces(): as you wrote some time ago, at the moment when the LineLM meets a glue element at the end of a sequence it could wrongly deduce it represents a trailing space, while it represents borders / paddings.

I'm going to look at the possible "patterns" that the elements for border and padding can have, and fix the method.

Regards
    Luca


Reply via email to