asciidoctor / asciidoctor-intellij-plugin

AsciiDoc plugin for products on the IntelliJ platform (IDEA, RubyMine, etc)
https://intellij-asciidoc-plugin.ahus1.de/
Apache License 2.0
355 stars 145 forks source link

display icons in the preview #1378

Open themr0c opened 1 year ago

themr0c commented 1 year ago

Why the new feature should be added

The preview should render icons, as it is part of the AsciiDoc language specification.

See: https://docs.asciidoctor.org/asciidoc/latest/macros/icons/

How the new feature should work

By default or when image icons are set, the preview should display the cloud image file in the directory specified by the iconsdir attribute.

= Document title

icon:cloud[]

When font icons are set, the preview should display the cloud font icon from the fas set:

= Document title
:icons: font

icon:cloud[set=fas]
mojavelinux commented 1 year ago

The preview should render icons, as it is part of the AsciiDoc language specification.

I want to be very clear that the AsciiDoc user docs are not the AsciiDoc language specification. They are the initial contribution for drafting such a specification, as stated on https://docs.asciidoctor.org/asciidoc/latest/#about-this-documentation. Nothing that they state about that language has been ratified, though that initial contribution certainly does serve as the basis and common understanding on which we are building.

Font-based icons will not likely be part of the first version of the specification. They will remain an implementation provided feature. The icon macro will be defined, but in such a way that it creates an icon node that the implementation must convert appropriately (how it is interpreted is left up to the implementation).

I still agree that it would be good to see this in the preview. You just can't defend that request by saying it is part of the specification.