Skip to content

slack project markupdown 2020 02 11

akabeko edited this page Feb 15, 2020 · 1 revision

2020-02-11

Time (UTC) Icon Name Message
11:36 spring-raining 可能なら出力対象に応じて画像を差し替えるような機構がVFMに欲しい… https://github.com/spring-raining/tbf08-draft/pull/3
原稿を送りします。ドキドキ。
11:36 Kiara Translation 🇬🇧: If possible, I want VFM to have a mechanism that replaces images according to the output target ... https://github.com/spring-raining/tbf08-draft/pull/3
11:40 spring-raining HTML的には一応これで解決はできます、がpictureタグにVivilostyleが対応してなさそう…
&lt;picture&gt;<br> &lt;source srcset="img_print.png" media="print"&gt;<br> &lt;img src="img_display.png"&gt;<br>&lt;/picture&gt;
11:40 Kiara Translation 🇬🇧: In HTML, this can be solved once, but Vivilostyle doesn't seem to support the picture tag ...
`&amp; lt; picture &amp; gt;<br>  &amp; lt; source srcset = "img_print.png" media = "print" &amp; gt;<br>  &amp; lt; img src = "img_display.png" &amp; gt;<br>&amp; lt; / picture &amp; gt; `
11:52 akabeko もし VFM でサポートするとしたら ![alt](src "title") の発展型として ![alt](src "title")(srcset "media")... ですかね。ひとつ目の参照が &lt;img&gt; で以降が &lt;source srcset media&gt; として連ねられてゆく感じで。
11:52 Kiara Translation 🇬🇧: If it is supported by VFM, is it an extension of ! [Alt] (src" title ")?! [Alt] (src "title") (srcset "media") ... The first reference is& lt; img & gt;and the rest is like& lt; source srcset media & gt;`.
11:54 spring-raining おっ スッキリして良さそうですね
11:54 Kiara Translation 🇬🇧: Oh, it looks good
12:10 akabeko 自分で書いておいてなんですが CommonMark や GFM の画像書式は属性が alt と title だけであることを前提としており、なにか追加されたら、それも複数だった場合は再考が必要ですね。

Markdown は "down" ゆえの割り切りにより、属性をどう扱うか?を意図的に避けてると認識してるので、私の思いついた方法も srcset と media のみ対応と前提しています。
12:10 Kiara Translation 🇬🇧: I wrote it myself, but the image format of CommonMark and GFM is based on the assumption that the attributes are only alt and title. If something is added, if there is more than one, it is necessary to reconsider.

How does Markdown handle attributes by divising "down"? I know that I'm intentionally avoiding, so the method I came up with assumes that only srcset and media are supported.
Clone this wiki locally