Menu

#81 Open and close all tags in every effected line

open-accepted
3
2012-12-25
2009-01-08
No

I have to merge output from GeSHi, with some other output in a table (last column comes from GeSHi).
For this to work GeSHi should close all tags opened in certain line and reopen ones that should also effect next line in next line. Maybe there is such a feature but I haven't found it. Attachment presents the problem.
-- piotr
PS. Great tool, thanks!

Discussion

  • Piotr Tarnowski

    Piotr Tarnowski - 2009-01-08

    Screen shot presenting the problem

     
  • Milian Wolff

    Milian Wolff - 2009-01-08

    You should use one of GeSHi's other markup output, i.e. the one which already produces a table and merge _your_ stuff in there. Or you can use the list output and convert the ul/li into other markup (since you'll have to keep the classes and stuff for highlighting to work), That's basically what you want,

    I'd say.this is a wont-fix/works for me. Benny, what do you say?

     
  • Milian Wolff

    Milian Wolff - 2009-01-08
    • labels: --> General New Feature
    • status: open --> open-works-for-me
     
  • Piotr Tarnowski

    Piotr Tarnowski - 2009-01-08

    According to http://qbnz.com/highlighter/api/geshi/core/_geshi.php.html GESHI_HEADER_PRE_TABLE is probably not a solution because it produces something like this:
    <table> <thead><tr><td colspan="2">$header</td></tr></thead> <tbody><tr><td>
    $linenumbers
    </td><td>
    $code>
    </td></tr></tbody> <tfooter><tr><td colspan="2">$footer</td></tr></tfoot> </table>

    but <li> seams to work fine. I've checked this with on-line demo from http://qbnz.com/highlighter/php_highlighter.php:

    <div class="c" style="white-space: nowrap;border: 1px dotted #a0a0a0; font-family: 'Courier New', Courier, monospace; font-size: 110%; background-color: #f0f0f0; margin: 0; line-height: 110%; padding: 0;color: #0000bb;"><div class="head">GeSHi &copy; 2004-2007 Nigel McNie, 2007-2008 Benny Baumann, 2008 Milian Wolff</div><ol><li class="li1"><div class="de1"><span class="coMULTI">/* UPS Monitor &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</span></div></li>
    <li class="li1"><div class="de1"><span class="coMULTI">&nbsp;wersja 1.0 dla systemu Linux &nbsp; &nbsp; &nbsp; &nbsp; </span></div></li>
    <li class="li1"><div class="de1"><span class="coMULTI">&nbsp;modul UPS Daemon &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </span></div></li>
    <li class="li2"><div class="de1">&nbsp;</div></li>
    <li class="li1"><div class="de1"><span class="coMULTI">*/</span></div></li>

    So <li> solves my problems (with little extra coding),

    thanks Milian.

     
  • BenBE

    BenBE - 2009-01-17

    Basically I agree to milian and this can, as you said yourself, be done with little extra code.

    I had a discussion with milian about different header formats for GeSHi some while back and suggested something like using a table as container for the whole code, using one table row per line, but that was disapproved back then.

    If you'd like to supply us a patch to do this we might consider adding this kind of header though, thus easing work on your side.

    Regards,
    BenBE.

     
  • BenBE

    BenBE - 2009-01-17
    • milestone: --> Next_Release_(Stable)
    • priority: 5 --> 3
    • assigned_to: nobody --> milianw
    • status: open-works-for-me --> open-accepted
     

Log in to post a comment.