Skip to content

Pandoc self-contained does not properly handle links to fonts in css #2737

Closed
humburg opened this Issue · 2 comments

2 participants

@humburg

With Pandoc 1.16.0.2 the following conversion attempt fails:

echo '<link rel="alternate stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/bootswatch/3.0.0/amelia/bootstrap.min.css" title="Amelia" media="screen"></link>' > test.md
pandoc test.md --to html --from  markdown --self-contained --output out.html

producing this error:

pandoc: Could not fetch //fonts.googleapis.com/css?family=Lobster|Cabin:400,700
InvalidUrlException "//fonts.googleapis.com/css?family=Lobster%7CCabin:400,700" "Invalid URL"

Using pandoc 1.13.2 this seems to work as expected. Related to #1477

@humburg humburg referenced this issue in jimhester/knitrBootstrap
Open

Add support for "self_contained" document option #172

@jgm jgm added a commit that closed this issue
@jgm Make protocol-relative URIs work again.
Closes #2737.
f2bd6fd
@jgm jgm closed this in f2bd6fd
@jgm
Owner

For posterity, the bug was introduced by ce55834
which was intended to prevent pandoc from treating C:/ in a Windows path as a protocol.
It affects 1.16..1.16.0.2.

@humburg

Thanks @jgm, that was very quick work.

@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm Make protocol-relative URIs work again.
Closes #2737.
a8b24e4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.