Maven Doxia

Confluence "quote" macro not recognised

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-8
  • Fix Version/s: 1.1
  • Component/s: Module - Confluence
  • Labels:
    None
  • Number of attachments :
    4

Description

The "quote" and "code" macros in Confluence should do something worthwhile in Doxia. They seem to only generate errors.

Activity

Hide
Dave Syer added a comment -

Attached patch (code-patch.txt) including test for code macro, and bug fix for problem with anchor at end of line (StringOutOfBoundsException). I recommend applying this patch and leaving this issue open for further discussion.

The quote macro involves perhaps a more difficult decision. There are lots of nice formatting tricks with confluence (quote, tip, note, info}. My suggestion would be to render them in Doxia as definition lists with one item, since this is already quite a common usage of definition lists in less rich markups (like Apt). Since there is no equivalent of a DL in Confluence (as far as I know) it kind of makes sense - but would require some care if anyone ever gets round to creating a Confluence Sink.

The DT of a definitio nlist could be "Quote", "Tip" etc. But that creates i18n issues. Plexus has an i18n utility that for sure ought to be usable, but I wouldn't know the details. This raises the point generally of how a module like this can be configured in a project pom when building a site?

Show
Dave Syer added a comment - Attached patch (code-patch.txt) including test for code macro, and bug fix for problem with anchor at end of line (StringOutOfBoundsException). I recommend applying this patch and leaving this issue open for further discussion. The quote macro involves perhaps a more difficult decision. There are lots of nice formatting tricks with confluence (quote, tip, note, info}. My suggestion would be to render them in Doxia as definition lists with one item, since this is already quite a common usage of definition lists in less rich markups (like Apt). Since there is no equivalent of a DL in Confluence (as far as I know) it kind of makes sense - but would require some care if anyone ever gets round to creating a Confluence Sink. The DT of a definitio nlist could be "Quote", "Tip" etc. But that creates i18n issues. Plexus has an i18n utility that for sure ought to be usable, but I wouldn't know the details. This raises the point generally of how a module like this can be configured in a project pom when building a site?
Hide
Lukas Theussl added a comment -

Patch applied in svn, thanks!

For the {quote, tip, note, info} macros, I agree with your suggestion but how would you tell them apart? Doxia doesn't handle in-line figures, so we can't use the icons. But I don't think it's a big deal, I think you can go ahead with it.

I don't see why i18n should be an issue. For a different language, you have to provide a different source document anyway.

Show
Lukas Theussl added a comment - Patch applied in svn, thanks! For the {quote, tip, note, info} macros, I agree with your suggestion but how would you tell them apart? Doxia doesn't handle in-line figures, so we can't use the icons. But I don't think it's a big deal, I think you can go ahead with it. I don't see why i18n should be an issue. For a different language, you have to provide a different source document anyway.
Hide
Dave Syer added a comment -

The issue is that

{note}
A note in textile wiki.
{note}

would be rendered as

<dl>
<dt>Note:</dt><dd>A note in textile wiki.</dd>
</dl>

So the text "Note:" is provided by Doxia - not in the language of the main document. How can we know what the locle / appropriate bundle is at runtime?

Show
Dave Syer added a comment - The issue is that
{note}
A note in textile wiki.
{note}
would be rendered as
<dl>
<dt>Note:</dt><dd>A note in textile wiki.</dd>
</dl>
So the text "Note:" is provided by Doxia - not in the language of the main document. How can we know what the locle / appropriate bundle is at runtime?
Hide
Lukas Theussl added a comment -

According to http://confluence.atlassian.com/renderer/notationhelp.action?section=advanced it is

{note:title=Be Careful}
The body of the note here..
{note}

so the title is provided in the source document. Or maybe I'm mixing something up here?

Show
Lukas Theussl added a comment - According to http://confluence.atlassian.com/renderer/notationhelp.action?section=advanced it is
{note:title=Be Careful}
The body of the note here..
{note}
so the title is provided in the source document. Or maybe I'm mixing something up here?
Hide
Dave Syer added a comment -

I guess I was making the same point as you about icons - there is no way to distinguish between a note/tip/info in Doxia, unless we do something in the text of the DT. I will go ahead and implement it without "icons" - it will be useful, but not as useful as it could be.

Show
Dave Syer added a comment - I guess I was making the same point as you about icons - there is no way to distinguish between a note/tip/info in Doxia, unless we do something in the text of the DT. I will go ahead and implement it without "icons" - it will be useful, but not as useful as it could be.
Hide
Dave Syer added a comment -

Additional patch for info/note/tip/quote attached (DOXIA-171.patch).

Show
Dave Syer added a comment - Additional patch for info/note/tip/quote attached (DOXIA-171.patch).
Hide
Lukas Theussl added a comment -

Applied, thanks!

Show
Lukas Theussl added a comment - Applied, thanks!

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: