Yup, this is basically a variation of #1, where you need to know the DOM of the final HTML document.

There are less than ten (like 2-6) pod to ?html things with anything resembling a user base, and only 2 are "popular"...

So there is not a whole lot to know, you make the text, so make it easy, resulting DOM is either one target node <div>##tablestart ... ##tableend</div>

or a bunch of siblings <p>##tablestart...<p>##tableend

Both are easily found if you tag the table

with jquery $(':contains("##tablestart")').each...text...replace...

or xpath (jquery also has a plugin)  var iterator = document.evaluate('//*[ not(./*)  and  contains( ., "##tablestart")/ ]', document.body, null, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null ); ...

Perhaps there should be something like =for !HTML or =begin !HTML ... =end !HTML?

:) If you think you need that, you should generate the pod from some other template language ... if it doesn't drive you insane

Yes, you could invent a =begin :format, but then you'd have to convince all those pod module authors to accept your solution, and all the users would have to upgrade .... seems like a nonstarter , pod is already too complex :)


In reply to Re^3: Only showing part of POD when not rendered as HTML by Anonymous Monk
in thread Only showing part of POD when not rendered as HTML by perlancar

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.