asciidoctor / sublimetext-asciidoc

AsciiDoc Package for SublimeText 3
MIT License
55 stars 22 forks source link

Option to NOT trim trailing whitespace on save #18

Open acebone opened 4 years ago

acebone commented 4 years ago

Hi!

I use firefox w. the asciidoctor addon to preview my writing.

I'd like to use the package 'Autosave', so that each time I alter the document, the preview is updated. However, it breaks my flow, that the last trailing whitespace is removed, andiendupwritingthingswithnospaceinbetween - which is rather annoying.

Luckily sublime text has a user setting "trim_trailing_white_space_on_save" that I can set to 'false'

Unfortunately, the asciidoctorpackage overrules this setting, and insists on removing trailing whitespace.

I'd suggest an option for the user to decide whether this whitespace should be trimmed or not. Most easy would probablye be, to simply check the "trim_trailing_white_space_on_save" - and behave accordingly