Skip to content

Instantly share code, notes, and snippets.

@sogaiu
Created April 29, 2025 09:36
Show Gist options
  • Save sogaiu/669b64f60237cf5cdf63b9d175cc4ef7 to your computer and use it in GitHub Desktop.
Save sogaiu/669b64f60237cf5cdf63b9d175cc4ef7 to your computer and use it in GitHub Desktop.
use pyrmont's remarkable to look for loose lists in janet docstrings
(import ./remarkable/init :as r)
(comment
(def content "hello")
(r/parse-md content)
# =>
[:document @{:container? true
:open? true}
@[[:paragraph @{:inlines? true
:open? false}
@[@"hello"]]]]
)
(comment
(def loose-list
``
There should be a loose list below:
* First item
* Second item
* Third item
``)
(r/parse-md loose-list)
# =>
[:document @{:container? true
:open? true}
@[[:paragraph @{:inlines? true
:open? false}
@[@"There should be a loose list below:"]]
[:list @{:container? true
:has-blank? true
:kind :bullet
:marker "*"
:open? false
:tight? false}
@[[:list-item @{:container? true
:open? false
:width 2}
@[[:paragraph @{:inlines? true
:open? false} @[@"First item"]]]]
[:list-item @{:container? true
:open? false
:width 2}
@[[:paragraph @{:inlines? true
:open? false} @[@"Second item"]]]]
[:list-item @{:container? true
:open? false
:width 2}
@[[:paragraph @{:inlines? true
:open? false} @[@"Third item"]]]]]]]]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment