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

spec: Prevent auto-generation of figure element by images inside explicit figure element #153

Open
MurakamiShinyu opened this issue Sep 5, 2022 · 0 comments
Labels
spec Spec related thing

Comments

@MurakamiShinyu
Copy link
Member

関連する仕様提案

明示的なfigure要素がある場合の画像ではfigure要素の自動生成をせず、属性の移動・コピーをしないようにする。

例:

<figure id="fig01" class="fig-lipsum">

![Lorem ipsum caption](lipsum.png){#img01 .img-lipsum}

</figure>

現在のvfmで出力されるHTML:

<figure id="fig01" class="fig-lipsum">
  <figure id="img01" class="img-lipsum">
    <img src="lipsum.png" alt="Lorem ipsum caption" class="img-lipsum">
    <figcaption aria-hidden="true">Lorem ipsum caption</figcaption>
  </figure>
</figure>

この仕様変更をおこなった場合の出力されるHTML:

<figure id="fig01" class="fig-lipsum">
  <img src="lipsum.png" alt="Lorem ipsum caption" id="img01" class="img-lipsum">
  <figcaption aria-hidden="true">Lorem ipsum caption</figcaption>
</figure>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec Spec related thing
Projects
None yet
Development

No branches or pull requests

1 participant