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

[1.x] [BUGFIX] Support :abbr: textrole #903

Merged
merged 1 commit into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@ final class AbbreviationTextRole extends BaseTextRole
{
protected string $name = 'abbreviation';

/** @return string[] */
public function getAliases(): array
{
return ['abbr'];
}

public function __construct(
private readonly LoggerInterface $logger,
) {
Expand Down
1 change: 1 addition & 0 deletions tests/Functional/tests/text-roles/text-roles.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<p><code>Default interpreted text</code></p>
<p><code>Lorem Ipsum</code></p>
<p><abbr title="last-in, first-out">LIFO</abbr></p>
<p><abbr title="Pretty Good Privacy">PGP</abbr></p>
<p><em class="aspect">Some important aspect</em></p>
<p><code>result = (1 + x) * 32</code></p>
<p><strong class="command">rm</strong></p>
Expand Down
2 changes: 2 additions & 0 deletions tests/Functional/tests/text-roles/text-roles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

:abbreviation:`LIFO (last-in, first-out)`

:abbr:`PGP (Pretty Good Privacy)`

:aspect:`Some important aspect`

:code:`result = (1 + x) * 32`
Expand Down
Loading