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

URL with two or more consecutive - signs disappears #768

Closed
rric opened this issue Feb 26, 2013 · 1 comment
Closed

URL with two or more consecutive - signs disappears #768

rric opened this issue Feb 26, 2013 · 1 comment
Labels

Comments

@rric
Copy link

rric commented Feb 26, 2013

Seen with pandoc-1.10.1 under Win7 when compiling txt -> LaTeX:

I experience an odd problem with the URL http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr (note the four '-' signs).

When I do not enclose the URL, it appears in the LaTeX file (not surrounded with \url{}, as expected).

When I do enclose the URL with pointy brackets, i.e. <http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr>, I would expect that the URL appears in the LaTeX output surrounded with \url{}.

Instead, the URL disappears -- it is simply not there in the LaTeX file. How so?

@jgm
Copy link
Owner

jgm commented Feb 26, 2013

As you can see if you do pandoc -t native, this is being
parsed as a raw HTML tag (which disappears in LaTeX).

Why, you might wonder? Because
http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr
doesn't pass pandoc's URL parser. This parser is designed to
work with plain URLs in text (since they are autolinked in
reST and markdown with the autolink_bare_urls extension.
It is designed to stop parsing when it hits something that
looks like punctuation at the end of the URL. For example,
someone might write:

See google's webpage---http://google.com---for more.

Here we don't want to include ---for more in the URL.

Of course, when the URL is enclosed in angle brackets, as it
is in your example, the situation is different, and the parser should
behave differently. I'll look into changing it.

+++ Roland [Feb 26 13 08:36 ]:

Seen with pandoc-1.10.1 under Win7 when compiling txt -> LaTeX:

I experience an odd problem with the URL
[1]http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr
(note the four '-' signs).

When I do not enclose the URL, it appears in the LaTeX file (not
surrounded with \url{}, as expected).

When I do enclose the URL with pointy brackets, i.e.
http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr, I
would expect that the URL appears in the LaTeX output surrounded with
\url{}.

Instead, the URL disappears -- it is simply not there in the LaTeX
file. How so?


Reply to this email directly or [2]view it on GitHub.
[xJAuenYDiIoVt3LF3y684-ROPF2J1mTpuJhB2FG3BtkQBmfZz4-IvkF4noQejWyX.gif]

References

  1. http://openclipart.org/detail/22566/lego-smiley----happy-by-pitr
  2. URL with two or more consecutive - signs disappears #768

@jgm jgm closed this as completed in 649608d Mar 1, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants