swift-docc: @Image seems to be ignored in Articles, one has to use ![]()
While reading abut docc one learns about directives and @Image
so one wants to use it… yet it does not seem to work in Articles, and one has to resort to the markdown method ![]()
this is rather confusing, as no warning is issued about the “wrong” use or anything else, leading one to dig through and start guessing if one messed up paths, names or something else.
Expected behavior
Option 1: Can we make @Image(source:
work in articles, in addition to the markdown style?
Option 2: Actually banning @Image
could be an option as in Articles it might be better to use ![]()
? But then we should issue warnings when this not supported use is detected.
Actual behavior
When using @Image(source: "example.png", alt: "...")
nothing happens, not even an empty <img>
is rendered.
Steps to Reproduce
Make some article, and use @Image in it; I did so in the following PR and it did not work: https://github.com/apple/swift-distributed-actors/pull/929/commits/0262b759738b4c92aa6ca10fd89d398f53086159 (open source package)
rdar://94284119
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (10 by maintainers)
Let’s summary on what we agree on
a. Directive related improvement
andb. markdown related fix
.(We’d better merge apple/markdown#50 andb
first thena
otherwisea
would have to use a buggy workaround)@Image
instead of give a warning and solution suggestion. (This PR need some major update to reflect this new change. I’ll make the PR draft and reenable it for review later)@Varients
support to@Image
so that we can reference variants for external image too.Any suggestion or supplement on the above summary is welcomed.
Mark this is closed since #381 is merged and should fix this issue.