lucc / nvimpager

Use nvim as a pager to view manpages, diffs, etc with nvim's syntax highlighting
Other
365 stars 19 forks source link

Strip whitespaces in detect_man_page_helper #91

Closed qouoq closed 9 months ago

qouoq commented 9 months ago

Attempt to fix #90, which is likely caused by empty lines containing spaces from git diff or hg diff.

This is a naive attempt, simply stripping all white spaces at the beginning of the detect_man_page_helper function (and removing the test on white spaces later, which then serves no purpose).

lucc commented 9 months ago

Thanks! The only case I can think of where this fails is when we need to detect a man page that has "bold" or "underlined" whitespace. Until we find such a case I am fine with this fix.