WordPress.org

Ready to get started?Download WordPress

Forums

BlogText
fix lists followed by a section (4 posts)

  1. spiralofhope
    Member
    Posted 2 years ago #

    A list which ends with a two-level nested item and is immediately followed by an empty line and an H1 (single =) will display that two-level nested item with an extra carriage return prepended.

    ----

    * example
    ** list

    = Example section

    (etc)

    ----

    This would render something like:

    * example
    **
    list

    = Example section

    (etc)

    http://wordpress.org/extend/plugins/blogtext/

  2. spiralofhope
    Member
    Posted 2 years ago #

    This seems to be a difficult issue.

    http://blogtext.mayastudios.com/syntax/#lists

    * item 1
    ** item 1.1
    *** item 1.1.1
    * item 2

    , is rendered with a carriage return before item 1.1

    I very very commonly use lists, so this is annoying. However, having written a little bit of code in this direction, I know exactly how obnoxious an issue this is. I empathize. =)

  3. Sebastian Krysmanski
    Member
    Plugin Author

    Posted 1 year ago #

    The BlogText parser is currently based on regular expressions which get more complicate and trickier to edit the bigger the parser is.

    This being said, I'm in the process of rewriting the parser but this will take some time and I'll probably not be finished before end of this year.

    As for your question: If you nest a list within a list (like in all of your examples) BlogText wraps the list item's text in <p>...</p> (to produce valid HTML). This may be the cause of your additional line breaks. However, both examples you provides render fine at my blog. Are you using the most recent version of BlogText (0.9.4)?

  4. spiralofhope
    Member
    Posted 1 year ago #

    Yes I'm using the most recent version.

    This example is definitely not rendering correctly for me:

    * item 1
    ** item 1.1
    *** item 1.1.1
    * item 2

    The HTML being created is:

    <ul>
    <li class="first-item">
    <p class="no-margin">item 1</p>
    <ul>
    <li>
    <p class="no-margin">item 1.1</p>
    <ul>
    <li>item 1.1.1</li>
    </ul>
    </li>
    </ul>
    </li>
    <li class="last-item">
    <p>item 2</p>
    </li>
    </ul>

    So you're correct about the <p>...</p>. However, do you think there's a way to leverage the no-margin class to make a kludgey workaround?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic