cstavitsky / slackpaste

paste in slack stuff, get output formatted for notion

Home Page:https://slackpaste.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Preserve nested lists upon paste

cstavitsky opened this issue · comments

Screenshot 2024-06-14 at 8 56 00 AM

This is the 'original' content upon paste.

 <ul data-stringify-type="unordered-list" data-indent="0" data-border="0">
     <li data-stringify-indent="0" data-stringify-border="0">this is outer nest</li>
 </ul>
 <ul data-stringify-type="unordered-list" data-indent="1" data-border="0">
     <li data-stringify-indent="1" data-stringify-border="0">one inner nest</li>
 </ul>
 <ul data-stringify-type="unordered-list" data-indent="2" data-border="0">
     <li data-stringify-indent="2" data-stringify-border="0">another level deeper nested</li>
     <li data-stringify-indent="2" data-stringify-border="0">sibling to third level deep</li>
 </ul>
 <ul data-stringify-type="unordered-list" data-indent="1" data-border="0">
     <li data-stringify-indent="1" data-stringify-border="0">second inner nest</li>
     <li data-stringify-indent="1" data-stringify-border="0">etc</li>
 </ul>
 <ul data-stringify-type="unordered-list" data-indent="0" data-border="0">
      <li data-stringify-indent="0" data-stringify-border="0">another outer nest</li>
 </ul>

It looks like data-indent is the attribute used to preserve nesting visually, so we would probably want to use that somehow. On googling, doesn't seem this is a 'known' attribute so might be internally used by slack?