sotte / presenting.vim

A simple tool for presenting slides in vim based on text files.
MIT License
300 stars 50 forks source link

Indented checkboxes don't render correctly in present mode #30

Closed ckangnz closed 3 years ago

ckangnz commented 3 years ago

image image

The indented checkboxes doesn't render properly

  elseif a:text =~? '^[*-] \[[x ]\]'
    let new_text += [substitute(substitute(a:text, '^[*-] \[ \]', '□', ''), '^[*-] \[x\]', '■', '')]

looks like needs to be updated, but i'm not too familiar with vim regex..

sotte commented 3 years ago

Thanks for reporting. I'll check it out this weekend.

sotte commented 3 years ago

You're right, the regex has to be adjusted.

'^[*-] only matches line start (^) followed by - or *. There should be whitespaces allowed, something like this '^\s[-]` (untested of course :) ).

Feel free to submit a PR! I don't have the capacity to fix it right now.

sotte commented 3 years ago

@chris542 can you confirm that #33 solves this issue. Then I can close this ticket.