Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter spiralofhope

    (@spiralofhope)

    This seems to be a difficult issue.

    https://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. =)

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

    Thread Starter spiralofhope

    (@spiralofhope)

    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?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: BlogText] fix lists followed by a section’ is closed to new replies.