Uploaded image for project: 'Markdown Syntax'
  1. Markdown Syntax
  2. MARKDOWN-59

Links anchors are not processed correctly

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 8.5.3
    • markdown/1.2
    • None
    • Unknown

    Description

      I use the Markdown module to convert Markdown (from a Github Wiki) to XWiki syntax. While doing so, internal links from the Markdown document aren't converted correctly. The internal links are converted "as is". For Github wiki (and a lot of other markdown implementations) it is assumed that each heading has an anchor, which is the same as the heading, lowercased and spaces replaced by dashes. However, XWiki uses another default anchor scheme: remove all spaces and prepend an "H". The Markdown converter should take this into account.

      Input (Markdown):

      - [Title one](#title-one)
      - [Title two](#title-two)
      
      ## Title one
      blah blah
      
      ## Title two
      asdf
      

      Expected output (XWiki):

      * [[Title one>>||anchor="HTitleone"]]
      * [[Title two>>||anchor="HTitletwo"]]
      
      == Title one ==
      blah blah
      
      == Title two ==
      asdf
      

      Actual output (XWiki):

      * [[Title one>>||anchor="title-one"]]
      * [[Title two>>||anchor="title-two"]]
      
      == Title one ==
      blah blah
      
      == Title two ==
      asdf
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            bkummel Bart Kummel
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: