WordPress.org

Ready to get started?Download WordPress

Forums

WP-Markdown
WP-Markdown treating java generics like HTML tags (2 posts)

  1. pythagras
    Member
    Posted 1 year ago #

    I just had a very frustrating experience with the WP Markdown plugin.

    With some Java generic code in a code block, ie:

    List<Integer> l = new ArrayList<Integer>();

    WP-Markdown was treating <Integer> as HTML, and no matter what I did, the code above got turned into something like

    List<Integer> l = new ArrayList</Integer><Integer>();</Integer>

    Is there any way to get WP Markdown to behave better with this kind of code? Gist and Stackoverflow don't have this problem.

    http://wordpress.org/extend/plugins/wp-markdown/

  2. khromov
    Member
    Posted 1 year ago #

    Ran into a similar problem.

    Solved the issue by downloading a newer version of Markdown Extra from:
    http://michelf.ca/projects/php-markdown/extra/

    Then I renamed the newly downloaded file from markdown.php to markdown-extra.php and overwrote the old file in the plugins/wp-markdown folder.

    Here is an example with your exact code, which runs fine with the new version of Markdown Extra:
    http://app.khromov.se/wiki/java-generics-test/

    It also works correctly with wp-markdown-syntaxhighlighter

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic