Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-14 Thread Marko Käning
On 12 May 2016, at 23:22 , Warren Young  wrote:
> The only reason to argue for [12345abc] form is that’s the form artifact IDs 
> take everywhere else in Fossil, most especially including the magic links in 
> checkin comments, which Makrdown wiki links most closely resemble.  Markdown 
> also uses square brackets for links, so it fits.

+1

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-12 Thread Ron W
On Thu, May 12, 2016 at 5:44 PM, Aslak Raanes  wrote:

> On 12 May 2016, at 23:09, Ron W wrote:
>
> As I recall, Fossil uses libdiscount
>
> You mean Natasha Kerensikova’s libsoldout
> ?
>
Now that you mention it, I remember that libsoldout is Natasha's fork of
libdiscount.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-12 Thread Aslak Raanes
On 12 May 2016, at 23:09, Ron W wrote:

> As I recall, Fossil uses libdiscount

You mean Natasha Kerensikova’s [libsoldout]?

[libsoldout]: https://github.com/faelys/libsoldout



___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-12 Thread Ron W
On Thu, May 12, 2016 at 5:09 PM, Ron W  wrote:
>
> Fossils's Markdown [3] page also mentions "automatic links", which are
> URLs or email addresses enclosed in < and >. This is not mentioned in
> either libdiscount or PHP Markdown Extras, but I assume it is provided by
> libdiscount.
>


> PS PHP Markdown Extras mentions image links, showing a syntax like:
> ![img](URL) - I assume libdiscount provides this, too.
>

FWIW, I accidentally found http://spec.commonmark.org/ which does define
automatic links and image links. It does not define tables, which were
mentioned in libdiscount and PHP Markdown Extras.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-12 Thread Warren Young
On May 12, 2016, at 3:09 PM, Ron W  wrote:
> 
> As I recall, Fossil uses libdiscount [1] to provide markdown support. 

My recollection is different: there is some historical tie between Fossil’s 
src/markdown.c and libdiscount, but they’re essentially independent now.  Their 
APIs are now incompatible.

> I suspect enhancing automatic links to support , ,  
> and  would be easier to do.

The only reason to argue for [12345abc] form is that’s the form artifact IDs 
take everywhere else in Fossil, most especially including the magic links in 
checkin comments, which Makrdown wiki links most closely resemble.  Markdown 
also uses square brackets for links, so it fits.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-12 Thread Ron W
On Wed, May 11, 2016 at 6:40 PM, Warren Young  wrote:
>
> Clearly this would be an extension to Markdown.  Doesn’t Fossil already
> have a few of those?  Tables, at the least.


As I recall, Fossil uses libdiscount [1] to provide markdown support. that
library provides PHP Markdown Extras [2] as well as a few of it's own
extensions.

Fossils's Markdown [3] page also mentions "automatic links", which are URLs
or email addresses enclosed in < and >. This is not mentioned in either
libdiscount or PHP Markdown Extras, but I assume it is provided by
libdiscount.

I suspect enhancing automatic links to support , ,
 and  would be easier to do. But however it's done, would
require enhancing libdiscount (or layer preprocessing onto libdiscount)).

[1] http://www.pell.portland.or.us/~orc/Code/discount/
[2] https://michelf.ca/projects/php-markdown/extra/
[3] http://fossil-scm.org/index.html/md_rules

PS PHP Markdown Extras mentions image links, showing a syntax like:
![img](URL) - I assume libdiscount provides this, too.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-12 Thread John Gabriele
On Wed, May 11, 2016, at 06:40 PM, Warren Young wrote:
> On May 11, 2016, at 4:38 PM, Richard Hipp  wrote:
> > 
> > On 5/11/16, Marko Käning  wrote:
> >> Referring to tickets on a wiki page like this: [968eb6376d] doesn't work,
> >> where one would have to use [968eb6376d](tktview?name=968eb6376d).
> >> 
> > 
> > This is only a problem with Markdown, because Markdown uses the
> > Markdown spec for hyperlinks, and that's the way Markdown is defined.
> 
> Clearly this would be an extension to Markdown.  Doesn’t Fossil already
> have a few of those?  Tables, at the least.

[gitit](https://github.com/jgm/gitit) [^1] has special markdown syntax
for linking to another wiki page: `[Some page name]()`.

I could see this being useful for the fossil wiki: when it sees
`[968eb6376d]()`, if there's no wiki page with that name, link to
`[968eb6376d](tktview?name=968eb6376d)`.

[^1]: a wiki based on [Pandoc](http://pandoc.org/)
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-11 Thread Marko Käning
On 12 May 2016, at 00:38 , Warren Young  wrote:

> On May 11, 2016, at 3:52 PM, Marko Käning  wrote:
>> 
>> Referring to tickets on a wiki page like this: [968eb6376d] doesn't work, 
>> where one would have to use [968eb6376d](tktview?name=968eb6376d).
>> 
>> Is this intended, or am I missing something?
> 
> Yes, it’s a known limitation.

I see now.


> To expand on your request, I also think you should be able to say things like
> 
>  …bla bla bla but there is a [plan](1235abc) to fix that.
> 
> in a wiki article that wants to refer to a ticket.

+1
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-11 Thread Warren Young
On May 11, 2016, at 4:38 PM, Richard Hipp  wrote:
> 
> On 5/11/16, Marko Käning  wrote:
>> Referring to tickets on a wiki page like this: [968eb6376d] doesn't work,
>> where one would have to use [968eb6376d](tktview?name=968eb6376d).
>> 
> 
> This is only a problem with Markdown, because Markdown uses the
> Markdown spec for hyperlinks, and that's the way Markdown is defined.

Clearly this would be an extension to Markdown.  Doesn’t Fossil already have a 
few of those?  Tables, at the least.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-11 Thread Warren Young
On May 11, 2016, at 3:52 PM, Marko Käning  wrote:
> 
> Referring to tickets on a wiki page like this: [968eb6376d] doesn't work, 
> where one would have to use [968eb6376d](tktview?name=968eb6376d).
> 
> Is this intended, or am I missing something?

Yes, it’s a known limitation.

This missing feature came up in a thread a month or two ago, but there were 
objections that allowing [12345abc] to automatically link to a ticket could be 
ambiguous:

1. The case of [123] possibly matching two or more tickets (or other artifact 
types!) is easy to deal with in an ad hoc basis, not involving Fossil at all: 
add more digits to the link until the meaning of the reference is no longer 
ambiguous.

2. A more serious issue is that the syntax is somewhat ambiguous within the 
syntax of Markdown itself.  It is legal to say [foo] [1], with the expectation 
that a link reference will follow later in the document:

  [1]: http://example.com

Therefore, if the Fossil Markdown processor came across [123], it would have to 
have two cases in its path: internal Markdown link or checkin comment like link 
to an artifact ID.

I think this objection is also fairly easily demolished: try to find an 
internal link reference first if the value in the brackets is a base-10 
integer, then try to find a suitable artifact if that fails.  And if the value 
in the brackets can only be a base-16 integer, skip straight to the artifact 
search.

To expand on your request, I also think you should be able to say things like

  …bla bla bla but there is a [plan](1235abc) to fix that.

in a wiki article that wants to refer to a ticket.
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] How to create a ticket link in the wiki?

2016-05-11 Thread Richard Hipp
On 5/11/16, Marko Käning  wrote:
> Referring to tickets on a wiki page like this: [968eb6376d] doesn't work,
> where one would have to use [968eb6376d](tktview?name=968eb6376d).
>

This is only a problem with Markdown, because Markdown uses the
Markdown spec for hyperlinks, and that's the way Markdown is defined.

-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users