Giter Club home page Giter Club logo

Comments (2)

melisgl avatar melisgl commented on August 27, 2024

The short answer is that the paragraphs belonging to the list item should be indented 4 spaces in compared to the bullet, while it's only 3 spaces in your example. Long story follows.

Consider the following example, where "paragraph" is indented 4 spaces and is parsed as part of the list item:

(3bmd-grammar:parse-doc "
- bullet line

    paragraph
")
=> ((:BULLET-LIST
     (:LIST-ITEM (:PARAGRAPH "bullet" " " "line")
                 (:PARAGRAPH "paragraph"))))

Good. 3bmd tolerates the bullet being indented 1 space in:

(3bmd-grammar:parse-doc "
 - bullet line

    paragraph
")
=> ((:BULLET-LIST
     (:LIST-ITEM (:PARAGRAPH "bullet" " " "line")
                 (:PARAGRAPH "paragraph"))))

but doesn't work if the "paragraph" is indented only 3 spaces:

(3bmd-grammar:parse-doc "
- bullet line

   paragraph
")
=> ((:BULLET-LIST
     (:LIST-ITEM (:PLAIN "bullet" " " "line")))
    (:PLAIN "   " "paragraph"))

In fact, this last version is what your example ended up looking like due to how pax guesses and strips the indentation from docstrings (see https://github.com/melisgl/mgl-pax#921-indentation and https://github.com/melisgl/mgl-pax#x-28MGL-PAX-3ADOCUMENT-OBJECT-20-28METHOD-20NIL-20-28STRING-20T-29-29-29).

from mgl-pax.

Aksej avatar Aksej commented on August 27, 2024

I thought indenting four times would create an inline code block, I misunderstood github markdown in that respect. Sorry for the false bug report!

from mgl-pax.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.