Skip to content

Consider "versionadded" as an admonition and improve "seealso" admonition #82

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

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

javiereguiluz
Copy link
Collaborator

This PR makes two changes:

  • Handles/renders "versionadded" directives as adominitions, to minimize the changes needed when publishing contents.
  • It adds an icon to "seealso" admonition to better match the style of other admonitions.

In practice it looks like this:

image

@@ -23,12 +23,15 @@ public function getName(): string
public function processSub(Parser $parser, ?Node $document, string $variable, string $data, array $options): ?Node
{
$wrapperDiv = $parser->renderTemplate(
'directives/version-added.html.twig',
'directives/admonition.html.twig',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The version-added.html.twig file can be deleted now, right?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or is the old template still used somehow?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sorry! I forgot about that 😞 Please, delete it if you can. Thanks!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that, and the tests fail! Something else is going on...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nevermind - it's fine - it was my mistake, I'm deleting it now :)

@weaverryan weaverryan merged commit 052ca46 into symfony-tools:master Mar 19, 2021
@javiereguiluz javiereguiluz deleted the more_admonitions branch March 19, 2021 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants