List followed by code snippet does not render properly. Example

  • Item One
  • Item Two
  • Item Three

    Log.i(MainActivity.class().getSimpleName(), SOME_MESSAGE); //info
    Log.d(MainActivity.class().getSimpleName(), SOME_MESSAGE); //debug
    Log.w(MainActivity.class().getSimpleName(), SOME_MESSAGE); //warning
    Log.e(MainActivity.class().getSimpleName(), SOME_MESSAGE); //error

Recommended Answers

All 12 Replies

Member Avatar for iamthwee

1.Item One
2.Item Two

fffff
  1. Item One
  2. Item Two
  3. Item Three

    Log.i(MainActivity.class().getSimpleName(), SOME_MESSAGE); //info
    Log.d(MainActivity.class().getSimpleName(), SOME_MESSAGE); //debug
    Log.w(MainActivity.class().getSimpleName(), SOME_MESSAGE); //warning
    Log.e(MainActivity.class().getSimpleName(), SOME_MESSAGE); //error

List followed by code snippet does not render properly. Example

You're right. The Log... lines are in Code block but have no line numbers.

I agree that this issue is annoying.

There are similar issues with code blocks inside of quotes.

I think the markdown renderer could use a bit of re-working.

It was determined to be an acceptable loss when creating the Markdown renderer that there was incomplete support for lists, mostly because we had no one on the dev team who was able to figure it out :)

You don't strike me as someone who accepts defeat so easily. ;)

I didn't. I spent like two months on it :) But the problem is that I have absolutely ZERO experience with tokenizers and every php-based Markdown parser out there was buggy. So I decided to stop wasting more time just for line numbering and move on to everything else that was needed to get the system live and get us off of vBulletin.

mostly because we had no one on the dev team who was able to figure it out :)

I lacked sufficient time to figure it out and sufficient approval from you in editing the base parser. IIRC, the argument was that significant changes to the base library would make upgrades more difficult, which is true. So I left it at that. Fight battles you can win, right? ;)

Deceptikon, I think you're confusing CodeMirror's lexer and its Markdown parser with PHPMarkdown, which is where the issue here is. I don't recall you ever playing around with PHPMarkdown, although I could be mistaken? (PHPMarkdown is a single file in its entirety, there's no base library.)

Did you update your version of PHPMarkdown? Because I spotted this on the developer's version history:

Extra 1.2.5 (8 Jan 2012):
Fixed an issue preventing fenced code blocks indented inside lists items and elsewhere from being interpreted correctly.

I haven't updated it recently. However, that is limited to fenced code blocks, not regular code blocks it seems.

So, if the markdown is rendered by a stock version of PHPMarkdown, and that the mishandling of the code blocks in lists and quotes comes from PHPMarkdown, then it would seem that the issue should be reported there.

We don't use a stock version of PHPMarkdown, so I'll have to double check that the bug does exist in stock before reporting it. I don't believe I made any changes related to lists though.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.