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

First preamble paragraph does not have the implicit lead role in the preview #1567

Closed
Vampire opened this issue Mar 12, 2024 · 4 comments
Closed
Labels

Comments

@Vampire
Copy link

Vampire commented Mar 12, 2024

Observed vs. expected behavior

https://docs.asciidoctor.org/asciidoc/latest/blocks/preamble-and-lead/#preamble-style says that with the default stylesheet the first preamble paragraph gets the implicit lead role if no explicit one is given.

If you generate PDF or HTML from the toolbar this is also done.

But the in-editor preview does not apply this implicit lead role for the first preamble paragraph.

While the "with the default stylesheet" is of course an escape-hatch, it would probably be more consistent to also there use the implicit lead role.

Steps to reproduce

  • Have a preamble
  • Look at the preview

Environment

Plugin Version: 0.41.8

IntelliJ Details: IntelliJ IDEA 2023.3.4 (Ultimate Edition)
Build #IU-233.14475.28, built on February 13, 2024

@Vampire Vampire added the bug label Mar 12, 2024
@Vampire Vampire changed the title First preamble paragraph does not have the implicit lead style in the preview First preamble paragraph does not have the implicit lead role in the preview Mar 12, 2024
@ahus1
Copy link
Contributor

ahus1 commented Mar 13, 2024

Thanks for creating this issue. I found the cause, and ask the Asciidoctor project for an update in their stylesheet: asciidoctor/asciidoctor#4564

In the meantime, I'll include a workaround in the plugin, which will be part of the next release. I'll update the issue once a pre-release is available.

@mojavelinux
Copy link
Member

The workaround in the plugin will be needed long-term as there's a good reason why the default stylesheet behaves the way it does. See my comment in the linked issue.

@ahus1
Copy link
Contributor

ahus1 commented Mar 13, 2024

Thanks to the Dan's description, I was able to tune the CSS adjustment that it behaves as expected.

= The Intrepid Chronicles

This is the preamble.

What are we going to do?

== Certain Peril

Daylight ...

renders with slightly larger preamble

image

while

= The Intrepid Chronicles

[.anything]
This is the preamble.

What are we going to do?

== Certain Peril

Daylight ...

renders with standard font preamble

image

while

= The Intrepid Chronicles

[.anything.lead]
This is the preamble.

What are we going to do?

== Certain Peril

Daylight ...

renders with slightly larger preamble

image

@ahus1
Copy link
Contributor

ahus1 commented Mar 23, 2024

This fix is now available as pre-release 0.41.10.

The pre-release of the plugin is available from GitHub releases and the IntelliJ AsciiDoc EAP repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants