3

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

Edited by peter_budo

6
Contributors
12
Replies
64
Views
3 Years
Discussion Span
Last Post by Dani
Featured Replies
  • 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](https://github.com/michelf/php-markdown/issues). Read More

0
  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.

Edited by Ancient Dragon

0

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.

0

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 :)

0

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.

0

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? ;)

Edited by deceptikon

0

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.)

0

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.

0

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

1

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.

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.