There are a few issues here. The simplest one is that we need a regexp that
can detect URLs within wikitext. I believe that we should evolve a regexp
that minimises false positives; negatives can always be fixed by writing an
explicit <a> element.

I do think it makes sense to allow users to extend the built-in list of
protocols. The easiest way to accomplish that would be to dynamically build
the regexp by concatenating the known protocols from $tw.config.

Another underlying issue is the way that TW Classic implemented pretty
links ambiguously; they can be used for external links or tiddler links.
There are heuristics within the core to choose the correct option at the
time the link is clicked, based on the characters within the link text, and
by checking for a reference to an existing tiddler. Thus, one can write
either of these:

[[a link|http://google.com]]
[[a link|HelloThere]]

But it isn't possible to link to google with [[http://google.com]].

I've been making some changes to link handling in the "widgetsredux2"
branch:

https://github.com/Jermolene/TiddlyWiki5/pull/178

The changes so far are:

* Explicit external links are parsed directly as <a> elements (instead of
as <$link> widgets that are resolved at click time)
* Pretty links can only be used for tiddler links, and not for external
links

My  plan now is to introduce a pretty syntax for external links as
discussed on an earlier hangout. I think we discussed something like this:

[file[a link|http://google.com]]

Hopefully we can come up with something a bit more concise.

Best wishes

Jeremy



On Mon, Oct 28, 2013 at 1:54 PM, Arkady Grudzinsky <agrudzin...@gmail.com>wrote:

> Continuing my thought, a token to force internal links might be useful too.
>
> How about this:
>
> [[Link text|URL]] - use regexp to detect external links (current behavior)
> [[Link text|'TiddlerName']] - indicates that 'TiddlerName' is a tiddler
> name.
> [[Link text|`URL`]] - indicates an external link.
>
>
> On Mon, Oct 28, 2013 at 6:40 AM, Arkady Grudzinsky 
> <agrudzin...@gmail.com>wrote:
>
>> Another thought is to create a token in the link syntax to force
>> Tiddlywiki use external link rather than internal link - e.g. [[Link
>> text||mutt://message_id]] or [[Link text|~mutt://message_id]].  This can be
>> useful in addition to the improved external link regexp.
>>
>>
>> On Mon, Oct 28, 2013 at 6:08 AM, Arkady Grudzinsky <agrudzin...@gmail.com
>> > wrote:
>>
>>> IMO, false positives are not as bad as false negatives.  False positives
>>> can always be escaped with ~.  There are plenty of false positives with
>>> CamelCase syntax.  At work, I frequently use internal product names in
>>> tiddlers, such as "SM3G".  They are recognized as tiddler names, but that's
>>> fine.  It has never bothered me as much as the inability to create my own
>>> protocol.  This is just my subjective user experience.
>>>
>>>
>>> On Mon, Oct 28, 2013 at 5:04 AM, Stephan Hradek <
>>> stephan.hra...@gmail.com> wrote:
>>>
>>>>
>>>>
>>>>> I didn't check if regexp b) is possible with Javascript.
>>>>>
>>>>
>>>> It's a fairly easy regexp and yes: It is possible with JavaScript.
>>>>
>>>> --
>>>> You received this message because you are subscribed to a topic in the
>>>> Google Groups "TiddlyWiki" group.
>>>> To unsubscribe from this topic, visit
>>>> https://groups.google.com/d/topic/tiddlywiki/3r9z2mq8N2Y/unsubscribe.
>>>> To unsubscribe from this group and all its topics, send an email to
>>>> tiddlywiki+unsubscr...@googlegroups.com.
>>>> To post to this group, send email to tiddlywiki@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/tiddlywiki.
>>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>>
>>>
>>>
>>>
>>> --
>>> Arkady
>>>
>>
>>
>>
>> --
>> Arkady
>>
>
>
>
> --
> Arkady
>
> --
> You received this message because you are subscribed to the Google Groups
> "TiddlyWiki" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to tiddlywiki+unsubscr...@googlegroups.com.
> To post to this group, send email to tiddlywiki@googlegroups.com.
> Visit this group at http://groups.google.com/group/tiddlywiki.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Jeremy Ruston
mailto:jeremy.rus...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To post to this group, send email to tiddlywiki@googlegroups.com.
Visit this group at http://groups.google.com/group/tiddlywiki.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to