以下の内容はhttps://notchained.hatenablog.com/entry/2017/02/15/112940より取得しました。


メモ:RでMarkdownファイルから画像のパスだけ抜き出すにはcommonmarkとxml2?

いちどcommonmarkでHTMLに変換したのをxml2で読む、というのがまだるっこしく感じるんですけど、Markdownをパースしてリストにしてくれるパッケージとかないものなんでしょうか?

md <- "
test
====

plot1
-----
![this is plot1](./path/to/plot1)

plot2
-----
![this is plot1](./path/to/plot2)
"

library(commonmark)
library(xml2)
library(magrittr)

html <- md %>%
  markdown_html() %>%
  read_html()

html %>%
  xml_find_all(".//img") %>%
  xml_attr("src")
#> [1] "./path/to/plot1" "./path/to/plot2"



以上の内容はhttps://notchained.hatenablog.com/entry/2017/02/15/112940より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14