Links in parentheses

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Links in parentheses

nawroth
Hi!

While looking through the entries in the GraphGist challenge I've noticed the following problem a few times:

People tend to put links inside of parentheses like so:
(see the entries of the challenge here: https://github.com/neo4j-contrib/graphgist/wiki)
which means the closing parenthesis will be part of the URL.

It's really nice in AsciiDoc that you can put URLs in the text as they are, but this problem makes that feature less useful.

Any ideas on how to deal with it?

/anders
Reply | Threaded
Open this post in threaded view
|

Re: Links in parentheses

LightGuardjp
One of the easiest ways, as this seems like a bug more than anything, would be to

. Create an issue for it
. Look at the link_spec.rb file and add a new test for it. 

The tests are easy to create. If you're really feeling adventurous try and fix it! A test though will certainly help us track it down. 

Sent from Mailbox for iPhone


On Mon, Feb 17, 2014 at 8:43 AM, nawroth [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hi!

While looking through the entries in the GraphGist challenge I've noticed the following problem a few times:

People tend to put links inside of parentheses like so:
(see the entries of the challenge here: https://github.com/neo4j-contrib/graphgist/wiki)
which means the closing parenthesis will be part of the URL.

It's really nice in AsciiDoc that you can put URLs in the text as they are, but this problem makes that feature less useful.

Any ideas on how to deal with it?

/anders


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Links in parentheses

mojavelinux
Administrator
In reply to this post by nawroth

Anders,

This was one of the issues that got fixed fixed in 1.5.0.preview.2. However, looking a bit closer I can see some cases it's still not catching. Plus, we are missing an explicit test for the scenario you presented.

The main issue is that the regexp I'm using needs to be split in two because it's trying to do too much. I'm going to do some cleanup.

I'm working on getting Asciidoctor.js updated to 1.5.0.preview.2. I'll let you know when it's ready.

Cheers,

-Dan

On Feb 17, 2014 8:42 AM, "nawroth [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hi!

While looking through the entries in the GraphGist challenge I've noticed the following problem a few times:

People tend to put links inside of parentheses like so:
(see the entries of the challenge here: https://github.com/neo4j-contrib/graphgist/wiki)
which means the closing parenthesis will be part of the URL.

It's really nice in AsciiDoc that you can put URLs in the text as they are, but this problem makes that feature less useful.

Any ideas on how to deal with it?

/anders


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML
Reply | Threaded
Open this post in threaded view
|

Re: Links in parentheses

nawroth
Hi!

Did you consider that parentheses are actually valid as part of an URL?

It's typically encountered in the fragment identifier of a JavaDoc constructor/method URL:

There's also applications abusing URLs to store some data, generating really weird URLs.
I think there should be a way to include such URLs in a document as well.

/anders


2014-02-17 19:52 GMT+01:00 mojavelinux [via Asciidoctor :: Discussion] <[hidden email]>:

Anders,

This was one of the issues that got fixed fixed in 1.5.0.preview.2. However, looking a bit closer I can see some cases it's still not catching. Plus, we are missing an explicit test for the scenario you presented.

The main issue is that the regexp I'm using needs to be split in two because it's trying to do too much. I'm going to do some cleanup.

I'm working on getting Asciidoctor.js updated to 1.5.0.preview.2. I'll let you know when it's ready.

Cheers,

-Dan

On Feb 17, 2014 8:42 AM, "nawroth [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hi!

While looking through the entries in the GraphGist challenge I've noticed the following problem a few times:

People tend to put links inside of parentheses like so:
(see the entries of the challenge here: https://github.com/neo4j-contrib/graphgist/wiki)
which means the closing parenthesis will be part of the URL.

It's really nice in AsciiDoc that you can put URLs in the text as they are, but this problem makes that feature less useful.

Any ideas on how to deal with it?

/anders


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495p1497.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Links in parentheses, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Links in parentheses

LightGuardjp
I would think that if the link is prefixed with a paren then the last paren should not be considered as part of the link. That should allow parens in the link. 

Sent from Mailbox for iPhone


On Mon, Feb 17, 2014 at 6:08 PM, nawroth [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hi!

Did you consider that parentheses are actually valid as part of an URL?

It's typically encountered in the fragment identifier of a JavaDoc constructor/method URL:

There's also applications abusing URLs to store some data, generating really weird URLs.
I think there should be a way to include such URLs in a document as well.

/anders


2014-02-17 19:52 GMT+01:00 mojavelinux [via Asciidoctor :: Discussion] <[hidden email]>:

Anders,

This was one of the issues that got fixed fixed in 1.5.0.preview.2. However, looking a bit closer I can see some cases it's still not catching. Plus, we are missing an explicit test for the scenario you presented.

The main issue is that the regexp I'm using needs to be split in two because it's trying to do too much. I'm going to do some cleanup.

I'm working on getting Asciidoctor.js updated to 1.5.0.preview.2. I'll let you know when it's ready.

Cheers,

-Dan

On Feb 17, 2014 8:42 AM, "nawroth [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hi!

While looking through the entries in the GraphGist challenge I've noticed the following problem a few times:

People tend to put links inside of parentheses like so:
(see the entries of the challenge here: https://github.com/neo4j-contrib/graphgist/wiki)
which means the closing parenthesis will be part of the URL.

It's really nice in AsciiDoc that you can put URLs in the text as they are, but this problem makes that feature less useful.

Any ideas on how to deal with it?

/anders


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495p1497.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Links in parentheses, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495p1501.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Links in parentheses

mojavelinux
Administrator
In reply to this post by nawroth

Yep, that's considered! If the URL ends in a round bracket, you must append [] to make it a link macro (otherwise, we simply can't guess the intent).

I did some cleanup & pushed the updates to master. Feel free to check out the tests.

(Phone fading, gotta cut out here.)

Cheers!

-Dan

On Feb 17, 2014 6:08 PM, "nawroth [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hi!

Did you consider that parentheses are actually valid as part of an URL?

It's typically encountered in the fragment identifier of a JavaDoc constructor/method URL:

There's also applications abusing URLs to store some data, generating really weird URLs.
I think there should be a way to include such URLs in a document as well.

/anders


2014-02-17 19:52 GMT+01:00 mojavelinux [via Asciidoctor :: Discussion] <[hidden email]>:

Anders,

This was one of the issues that got fixed fixed in 1.5.0.preview.2. However, looking a bit closer I can see some cases it's still not catching. Plus, we are missing an explicit test for the scenario you presented.

The main issue is that the regexp I'm using needs to be split in two because it's trying to do too much. I'm going to do some cleanup.

I'm working on getting Asciidoctor.js updated to 1.5.0.preview.2. I'll let you know when it's ready.

Cheers,

-Dan

On Feb 17, 2014 8:42 AM, "nawroth [via Asciidoctor :: Discussion]" <[hidden email]> wrote:
Hi!

While looking through the entries in the GraphGist challenge I've noticed the following problem a few times:

People tend to put links inside of parentheses like so:
(see the entries of the challenge here: https://github.com/neo4j-contrib/graphgist/wiki)
which means the closing parenthesis will be part of the URL.

It's really nice in AsciiDoc that you can put URLs in the text as they are, but this problem makes that feature less useful.

Any ideas on how to deal with it?

/anders


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495p1497.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Links in parentheses, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Links-in-parentheses-tp1495p1501.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML