johnxnguyen / Down

Blazing fast Markdown / CommonMark rendering in Swift, built upon cmark.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

file protocol is not support

snaill opened this issue · comments

let down = Down(markdownString: "![map](file:///Users/snaill/_WriteDownOutput/71.png)")
let html = try down.toHTML()
XCTAssertEqual(html, "<img src=\"\" alt=\"map\" />")

let down = Down(markdownString: "![map](/Users/snaill/_WriteDownOutput/71.png)")
let html = try down.toHTML()
XCTAssertEqual(html, "<img src=\"/Users/snaill/_WriteDownOutput/71.png\" alt=\"map\" />")