Re: [xwiki-users] Markdown 8.3 Links to headings

2016-12-20 Thread Vincent Massol
Hi Stefan,

> On 20 Dec 2016, at 10:44, Stefan Helmerichs  wrote:
> 
> Hi again,
> 
> after meticulous testing, I found that the MediaWikiSyntax ([[...]])
> does not work for headings. Neither does:
> 
> XWiki 2.1 ([[.PageA||anchor="HHeading"]])

The MD 1.1 parser is using the XWiki 2. reference parsers for links and images. 
Apparently, it’s not handling parameters though. Would be nice if you could 
create a lira issue for this.

You should also know that I’ve started a rewrite of the MD support in XWiki by 
using flexmark-java since peg down is apparently EOL (see 
http://jira.xwiki.org/browse/MARKDOWN-16).

So far my POC looks interesting and I already have several of the tests passing 
but it’ll be able to replace the current implementation only when at least all 
current tests pass. There still is substantial work for this. I’m currently on 
holidays which is why I’m able to work a bit on this (since otherwise working 
on this is not really in the xwiki roadmap).  I’ll make sure your use case is 
supported.

However I can’t commit on anything ATM since I’m also trying to spend my 
holidays with my family and not on the computer all the time ;) lol

In the meantime it’s probably quite simple to add support for reference 
parameters with the current pegdown implementation.

Thanks
-Vincent

> XWiki 2.0 ([[label>>Space.Page#HHeading]])
> Confluence Markup ([#Heading], [HHeading], [#HHeading])
> Creole ([[#Heading]], [[#HHeading]])
> 
> So, right now, I am lost. Any more suggestions from anyone would be very
> much appreciated.
> 



[xwiki-users] Markdown 8.3 Links to headings

2016-12-20 Thread Stefan Helmerichs
Hi again,

after meticulous testing, I found that the MediaWikiSyntax ([[...]])
does not work for headings. Neither does:

XWiki 2.1 ([[.PageA||anchor="HHeading"]])
XWiki 2.0 ([[label>>Space.Page#HHeading]])
Confluence Markup ([#Heading], [HHeading], [#HHeading])
Creole ([[#Heading]], [[#HHeading]])

So, right now, I am lost. Any more suggestions from anyone would be very
much appreciated.



[xwiki-users] Markdown 8.3 Links to headings

2016-12-19 Thread Stefan Helmerichs
Hi Vincent,

thank you for the reply, and I see I forgot to mention the "little" fact
that we are supposed to keep using the markdown-syntax which works
in pandoc so we could theoretically create a nice and beautiful and
working pdf file from that markdown, so the [[..]] syntax is, sadly, not
so easy to use.

Not that there aren't any other options to do this, but well...

Will skim through the Jira, too, if anyone knows another solution to
this, I'd be happy ot hear it =)
If not, then maybe that will convince my superior to allow a conversion
tool for this kind of thing ^^

Thanks,
-Stefan



Re: [xwiki-users] Markdown 8.3 Links to headings

2016-12-19 Thread Vincent Massol
Hi Stefan, 

Try using the syntax [[...]]. I'm offline so can't check much. There are also 
some open Jira issues that you could check that can explain some existing 
limitations.

Thanks
-Vincent



Thanks
-Vincent
> On 19 Dec 2016, at 08:25, Stefan Helmerichs  wrote:
> 
> Hi,
> 
> I am having issues when tring to link to headings in pages with markdown.
> The regular syntax (which we'd have to keep, or at least keep as basis)
> for this would be [link name](#headingId).
> 
> When markdown gets parsed for xwiki, ID's are being generated for the
> headings, and if the id-codes are known it is a simple matter of linking
> to those, however, this becomes a near impossibility to do
> beforehand. Since we'd like to avoid having to re-edit every single page
> after sending a markdown page to the api, we would like to keep
> this quite simple syntax, since the only workaround we could do was
> insert html tags at appropriate places - however these are not evaluated
> when the document is parsed with markdown.
> 
> Plus, when I use a Link to #page, xwiki will try to link to a page
> named %23page instead of linking to the heading "page".
> 
> So the question is - is there a way to keep the simple markdown-syntax,
> or change it slightly, to link to a heading within this page?
> 


[xwiki-users] Markdown 8.3 Links to headings

2016-12-18 Thread Stefan Helmerichs
Hi,

I am having issues when tring to link to headings in pages with markdown.
The regular syntax (which we'd have to keep, or at least keep as basis)
for this would be [link name](#headingId).

When markdown gets parsed for xwiki, ID's are being generated for the
headings, and if the id-codes are known it is a simple matter of linking
to those, however, this becomes a near impossibility to do
beforehand. Since we'd like to avoid having to re-edit every single page
after sending a markdown page to the api, we would like to keep
this quite simple syntax, since the only workaround we could do was
insert html tags at appropriate places - however these are not evaluated
when the document is parsed with markdown.

Plus, when I use a Link to #page, xwiki will try to link to a page
named %23page instead of linking to the heading "page".

So the question is - is there a way to keep the simple markdown-syntax,
or change it slightly, to link to a heading within this page?