Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Excerpt #285

Closed
nagper opened this issue Mar 14, 2023 · 13 comments
Closed

Excerpt #285

nagper opened this issue Mar 14, 2023 · 13 comments
Assignees

Comments

@nagper
Copy link

nagper commented Mar 14, 2023

Hi there,

I wonder if marking text as an 'excerpt' is supported?

Thanks,
Peter

@bsorrentino
Copy link
Owner

Hi @nagper do you mean markdown excerpt or what else ?

However markdown excerpt is not supported

@bsorrentino bsorrentino added question discussion start discussion about issue labels Mar 14, 2023
@nagper
Copy link
Author

nagper commented Mar 14, 2023

Hi,

A meant the confluence excerpt macro.

Regards,
Peter

@bsorrentino
Copy link
Owner

bsorrentino commented Mar 14, 2023

Hi @nagper thanks for clarification

Actually every macro that can be written in confluence wiki could be used in this plugin.
Also in markdown you can use confluence macro (see Include custom macro(s) section)

for example you can use

{excerpt:hidden=true|atlassian-macro-output-type=BLOCK}
This is the *text* I want to reuse in other pages. This text is inside an Excerpt macro.
{excerpt}

@nagper
Copy link
Author

nagper commented Mar 14, 2023

Hi @bsorrentino ,
oh, I have not seen this, sounds perfect, thank you!

@nagper nagper closed this as completed Mar 14, 2023
@nagper nagper reopened this Mar 17, 2023
@nagper
Copy link
Author

nagper commented Mar 17, 2023

Hi @bsorrentino ,

I might misunderstand something but for me only the 1 liner macros works:

If i want to split them over several lines:

the server returns with the following error:
[ERROR] {"statusCode":500,"data":{"authorized":false,"valid":true,"allowedInReadOnlyMode":true,"errors":[],"successful":false},"message":"com.atlassian.confluence.content.render.xhtml.migration.exceptions.UnknownMacroMigrationException: The macro 'html' is unknown.","reason":"Internal Server Error"}

Am i doing something wrong?

Thanks,
Peter

@bsorrentino
Copy link
Owner

Hi @nagper

could provide me an example ?

@nagper
Copy link
Author

nagper commented Mar 19, 2023

Hi @bsorrentino ,

I've just seen, that my previous post did not work, i suspect i should have put my example in parenthesis.
(still i do not know how to make newlines appear...)
So here is the example:

This leads to the error message:
<!-- {excerpt:title=MyExcerpt} <there is a newline here> This is the content that I want to use as my excerpt. <there is a newline here> {excerpt} -->
(please insert a newline where i expliticly mentioned that there should be a newline there)

This works:
<!-- {excerpt:title=MyExcerpt} This is the content that I want to use as my excerpt. {excerpt} -->

Thanks,
Peter

@bsorrentino bsorrentino self-assigned this Mar 19, 2023
bsorrentino added a commit that referenced this issue Mar 20, 2023
test multiline html comment for identify confluence macro + test publishing

#285
bsorrentino added a commit that referenced this issue Mar 20, 2023
update regex for detecting html comment to handle multiline content

#285
@bsorrentino
Copy link
Owner

bsorrentino commented Mar 20, 2023

Hi @nagper

I've deployed dev release 7.11-SNAPSHOT with fix. Please, take chance to test it an let me know if it works as expected

@nagper
Copy link
Author

nagper commented Mar 20, 2023

Hi @bsorrentino ,

Thanks for your fix., It does work better, however there are still some glitches:

The formatting inside the excerpt falls apart.

Please try inserting a formatted text under or below the text in the excerpt, e.g.:
"### test"

As a result the string "text" will be converted to a list

Thanks,
Peter

@bsorrentino
Copy link
Owner

Hi @nagper you right.

Simply the content on excerpt is not parsed as markdown but in wiki confluence format.

I'll working on

bsorrentino pushed a commit that referenced this issue Mar 20, 2023
@nagper
Copy link
Author

nagper commented Mar 20, 2023

Thanks a lot!

bsorrentino pushed a commit that referenced this issue Mar 20, 2023
bsorrentino pushed a commit that referenced this issue Mar 20, 2023
bsorrentino pushed a commit that referenced this issue Mar 21, 2023
bsorrentino pushed a commit that referenced this issue Mar 21, 2023
implement 'processConfluenceMacro' method in CommonmarkConfluenceWikiVisitor invoked on visit( HtmlBlock )

#285
@bsorrentino
Copy link
Owner

bsorrentino commented Mar 21, 2023

Hi @nagper

I've deployed a new dev release 7.11-SNAPSHOT with fix. Please, take chance to test it an let me know if it works as expected 🤞

@nagper
Copy link
Author

nagper commented Mar 21, 2023

Hi @bsorrentino,

It seems to be working fine now, thank you!

Peter

@nagper nagper closed this as completed Mar 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants