Maven Doxia
  1. Maven Doxia
  2. DOXIA-361

Confluence: figure captions not rendered

    Details

    • Number of attachments :
      1

      Description

      Figure captions seem to go into the <img alt=""> attribute, ie they are not rendered in the xhtml output.

        Activity

        Hide
        Robert Scholte added a comment -

        XhtmlSinkTest#getFigureBlock() seems to test this usecase and succeeds. Or are you talking about something else?

        Show
        Robert Scholte added a comment - XhtmlSinkTest#getFigureBlock() seems to test this usecase and succeeds. Or are you talking about something else?
        Hide
        Lukas Theussl added a comment -

        This issue is about the confluence parser. There is a test in doxia-site-renderer (see figure.confluence). As far as I can tell this test is not asserted, but the resulting figure.html file shows the defect.

        Show
        Lukas Theussl added a comment - This issue is about the confluence parser. There is a test in doxia-site-renderer (see figure.confluence ). As far as I can tell this test is not asserted, but the resulting figure.html file shows the defect.
        Hide
        Lukas Theussl added a comment -

        The fix is simply to use sink events that take a SinkEventAttributeSet, see the Note at http://maven.apache.org/doxia/issues/#Figure_sink_events

        I have checked by inspection that captions are rendered correctly in html output but got no time to properly implement a test case.

        Show
        Lukas Theussl added a comment - The fix is simply to use sink events that take a SinkEventAttributeSet, see the Note at http://maven.apache.org/doxia/issues/#Figure_sink_events I have checked by inspection that captions are rendered correctly in html output but got no time to properly implement a test case.
        Hide
        Robert Scholte added a comment -

        I start to understand the confusion.
        org.apache.maven.doxia.sink.XhtmlBaseSink.figure() is marked as deprecated, but org.apache.maven.doxia.sink.Sink.figure() not.
        This is a weird situation, where the implementation decided to deprecate a method from the API.
        So the ConfluenceParser can call figure() unless the XhtmlBaseSink implementation is used.
        We shouldn't accept special cases.
        There are 2 options: deprecate org.apache.maven.doxia.sink.Sink.figure() or fix org.apache.maven.doxia.sink.XhtmlBaseSink.figure(). Agree?

        Show
        Robert Scholte added a comment - I start to understand the confusion. org.apache.maven.doxia.sink.XhtmlBaseSink.figure() is marked as deprecated, but org.apache.maven.doxia.sink.Sink.figure() not. This is a weird situation, where the implementation decided to deprecate a method from the API. So the ConfluenceParser can call figure() unless the XhtmlBaseSink implementation is used. We shouldn't accept special cases. There are 2 options: deprecate org.apache.maven.doxia.sink.Sink.figure() or fix org.apache.maven.doxia.sink.XhtmlBaseSink.figure() . Agree?
        Hide
        Lukas Theussl added a comment -

        Hmm, I hadn't realized that... From an objective point of view, I'd certainly go for option 2: XhtmlBaseSink.figure() should just forward to XhtmlBaseSink.figure( null ). Unfortunately, I don't remember the details but I suppose there were some backward-compat arguments to keep it the way it is, as otherwise I would not have specifically added the note linked above.

        Show
        Lukas Theussl added a comment - Hmm, I hadn't realized that... From an objective point of view, I'd certainly go for option 2: XhtmlBaseSink.figure() should just forward to XhtmlBaseSink.figure( null ). Unfortunately, I don't remember the details but I suppose there were some backward-compat arguments to keep it the way it is, as otherwise I would not have specifically added the note linked above.
        Hide
        Robert Scholte added a comment -

        We probably have to break backwards compatibility, so pushing this forward to 2.0

        Show
        Robert Scholte added a comment - We probably have to break backwards compatibility, so pushing this forward to 2.0
        Hide
        Lukas Theussl added a comment -

        Not sure if I'm missing something but I think this issue, concerning only the confluence parser, should be fixed in 1.x. Fixing the XhtmlBaseSink should probably go into 2.0.

        Show
        Lukas Theussl added a comment - Not sure if I'm missing something but I think this issue, concerning only the confluence parser, should be fixed in 1.x. Fixing the XhtmlBaseSink should probably go into 2.0.
        Hide
        Robert Scholte added a comment -

        A quick scan tells me that Sink.figure() is used by the ConfluenceParser, AptParser and TwikiParser.
        So the hotfix should be implemented for all these Parsers, which implies that Sink.figure() would actually be deprecated.

        Show
        Robert Scholte added a comment - A quick scan tells me that Sink.figure() is used by the ConfluenceParser , AptParser and TwikiParser . So the hotfix should be implemented for all these Parsers, which implies that Sink.figure() would actually be deprecated.

          People

          • Assignee:
            Robert Scholte
            Reporter:
            Lukas Theussl
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: