Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Pod::Markdown: problem with =begin markdown ... =end markdown inside an =item

by kcott (Archbishop)
on Jan 02, 2023 at 20:02 UTC ( [id://11149303]=note: print w/replies, xml ) Need Help??


in reply to Pod::Markdown: problem with =begin markdown ... =end markdown inside an =item

G'day Darkwing,

I didn't have Pod::Markdown so I installed it and got the latest version, 3.300. I was able to reproduce your results: so rt:131585 is still outstanding. By the way, I'm using Perl v5.36.0.

That bug was raised on 28-Jan-2020. The last module update was on 1-Nov-2020. So maintenance was at least active at the time that the bug was reported. You could try contacting the module author, Randy Stauner, directly: there are some (links to) contact details in https://metacpan.org/author/RWSTAUNER. (I note that he's a registered monk, rwstauner, but as he hasn't been seen wandering the cloisters in about a decade, contact via /msg is probably a dead-end.)

In terms of a workaround, I'm not really across why you want "=begin markdown" when you're converting to Markdown. Removing both the "=begin" and "=end" paragraphs, and changing "**bold**" to "B<bold>", would appear to provide the output you're looking for.

$ cat test.pod =over =item * Huhu! This should be B<bold> using markdown. =back $ pod2markdown < test.pod > test.md $ cat test.md - Huhu! This should be **bold** using markdown.

Plugging that into https://codebeautify.org/markdown-viewer, I get

  • Huhu!

    This should be bold using markdown.

If you could provide a few more details regarding your ultimate goal, we may be able to provide an improvement upon my simplistic workaround offered above.

— Ken

Replies are listed 'Best First'.
Re^2: Pod::Markdown: problem with =begin markdown ... =end markdown inside an =item
by Darkwing (Beadle) on Jan 03, 2023 at 07:21 UTC

    Hi Ken,

    thanks. I'll send a mail.

    The example, of course, is a minimal example. In reality, i do something else. Main purpose of using markdown embedded in POD is displaying tables without the need to switch to a non-standard such as PseudoPOD. Example (the real table has more rows):

    =for ! begin markdown unindent=| Option Import Trace Export -------------- -------- ------- -------- `-b` o o - `-c` o o o `-D` o o o `-e` - o - `-E` o o o `-f` -/m -/m -/m `-I` o o o `-m` - o - `-M` o - - `-n` o - - `-o` o o o `-O` o o o =for ! end markdown
    When typing perlpod TheTool.pl, the =for lines are ignored and the user sees an ascii formatted table. When i produce the HTML and LaTeX code i first pass this to a filter script that converts the =for ... lines to =begin markdown and =end markdown (the unindent=| in the first =for is an additional argument for this filter). So i get a nicely formatted HTML/LaTeX table. This works fine outside a list but unfortunately it does not inside an =item, here i also get only ascii formatting even in HTML and LaTeX which again is caused by this unwanted indentation.

      Thanks for the follow-up and the "filter script" clarification.

      Please let us know how you go chasing this up with the author.

      — Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11149303]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 20:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found