#687685 libpod-markdown-perl: Generating markdown pages from pod creates wrong link

#687685#5
Date:
2012-09-15 06:17:55 UTC
From:
To:
Dear Maintainer,

   * What led up to the situation?

I generated a README.md from my perl program using pod2markdown.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

pod2markdown myfile > README.md

   * What was the outcome of this action?

See the README.md here:
https://github.com/jcdubacq/compile-latex/tree/7e6b71d6979b58b51fb1dc3cd85f0f7fc3060819

The internal links were in caps, but markdown changes the case of
the linked parts in the anchor name. For example, section DEBUG will
be called DEBUG but have a name #debug for anchor.


   * What outcome did you expect instead?

The links should be transformed in lowercase.

Compare with
https://github.com/jcdubacq/compile-latex/tree/1d1e60c2b2dba9dcb4bbfd00b7227bb963022d63

the diff is
https://github.com/jcdubacq/compile-latex/commit/1d1e60c2b2dba9dcb4bbfd00b7227bb963022d63

#687685#10
Date:
2012-10-27 23:10:42 UTC
From:
To:
forwarded 687685 https://rt.cpan.org/Public/Bug/Display.html?id=57776
thanks

I didn't really understand your issue when first reading your bug
report, so I'll try to rephrase it:

You have an internal link in POD, like L</"DEBUG">. Using pod2markdown,
this results in markdown output like ["DEBUG"](#DEBUG). On github, this
doesn't actually create a working link to the section titled DEBUG, but
["DEBUG"](#debug) does, and so you're asking for pod2markdown to produce
that. Correct?

The problem with that request is that standard markdown does not have a
mechanism to define internal anchors that can be linked to, as opposed
to e.g. pandoc (see
http://johnmacfarlane.net/pandoc/demo/example9/pandocs-markdown.html#header-identifiers-in-html-latex-and-context).
The patch in RT #57776 tries to add a similar mechanism to
Pod::Markdown, but not necessarily in a way that's compatible with
github flavored markdown.

Florian