my modified lexer fails its test

Issue #1338 resolved
Kurt Neufeld
created an issue

I'm trying to tweak the MarkDown lexer (I'm the original author of it) and now the tests are failing.

Part of my tweaks are to drop some of the control characters to more closely match what an html renderer would do.

For example (need to put everything in a code block so the wiki doesn't render it):

If the original doc contains: _this is in italics_

If rendered to html: <span class="ge">this is in italics</span>

But if rendered to terminal256: _this is in italics_     (in actual italics)

I'd argue that the leading/trailing '_' chars are incorrect so my modified
lexer drops them. However this causes the test to fail because _ char is missing.

So my question is how to make the tests pass, or convince me that terminal256 should NOT drop the control characters.

Comments (7)

  1. Kurt Neufeld reporter

    Besides the example above:

    echo "next word in _italics_" | pygmentize -f html -l md
    <div class="highlight"><pre><span></span>next word in <span class="ge">italics</span>
  2. Log in to comment