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

Links anchors are not processed correctly

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 8.5.3
    • Fix Version/s: None
    • Component/s: Markdown 1.2
    • Labels:
      None
    • Difficulty:
      Unknown
    • Similar issues:

      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

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

              Dates

              • Created:
                Updated:
                Date of First Response: