turnermm / Updatable-Snippets-for-Dokuwiki

Inserts updatable snippets into Dokuwiki pages
https://dokuwiki.org/plugin:snippets
GNU General Public License v2.0
6 stars 4 forks source link

Snippet templates and spaces #47

Open chtiland opened 1 year ago

chtiland commented 1 year ago

Hello,

A little problem quite annoying with spaces (when snippet starts with a list (ordered or not). When you create a snippet like this one (I use £ to mark cursor position, it's not in the snippet)

  - **First**
    * Name : 
    * Description : 
    * Cases :   
      - £

When you insert it, first spaces on first line, and last space(s?) are not copied, so you get

- **First**
    * Name : 
    * Description : 
    * Cases :  
      -£

Spaces after ":" are well kept, but no more spaces for the first line of an ordered list, and no more space before cursor position on the last line.

For the last space (before cursor position) that's the less annoying issue.

May be you should add keywords like {space} (to force space insertions) and {cursor} to fix cursor position after inserting snippet.

Thanks !

chtiland commented 1 year ago

Hello and Happy new year !

I think the issue is due to insertion of two chariot returns (new lines) before inserting snippet's content at cursor position. (simple snippet no macro, no update)

Have a nice day