WordPress.org

Ready to get started?Download WordPress

Forums

Enlighter - Customizable Syntax Highlighter
[resolved] No indentation in the first line (4 posts)

  1. cdonts
    Member
    Posted 3 months ago #

    Hello again. First of all, I love the new style of EnlighterJS, it's just awesome and beautiful!

    The problem is, I think with this specific new version, the first line looses the indentation, for example:

    [python]
        if b:
            print("Hello world!")
    [/python]

    This outputs:

    if b:
            print("Hello world!")

    But should be:

    # I need this coment, otherwise the problem also happens here
        if b:
            printf("Hello world!")

    I solved this now by putting some   in the first line to simulate the indentation.

    Thanks in advance!

    Edited: wow, the problem also happens here.

    https://wordpress.org/plugins/enlighter/

  2. Andi Dittrich
    Member
    Plugin Author

    Posted 3 months ago #

    Dear cdonts,
    thanks for your report :)

    well..this seems to be a bug caused by a trim() applied to the content, which should remove leading+trailing whitespaces.
    i will fix it as soon as possible.

    best regards, Andi

  3. Andi Dittrich
    Member
    Plugin Author

    Posted 3 months ago #

    Fixed in Enlighter v2.1 :)

  4. cdonts
    Member
    Posted 3 months ago #

    Excelent, like always! Thanks a lot!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.