mdless adds blank lines before and after content
atsaloli opened this issue · 3 comments
atsaloli commented
Hello,
Thanks for a great tool! Very useful.
Why are there blank lines inserted in mdless
output before and after the main content?
For example:
[root@localhost source]# cat /tmp/example.md
# header
text
[root@localhost source]# mdless /tmp/example.md
header ============================================================================================================================================================================================================
text
[root@localhost source]#
Put another way:
[root@localhost source]# wc -l /tmp/example.md
3 /tmp/example.md
[root@localhost source]# mdless /tmp/example.md | wc -l
8
[root@localhost source]#
The extra blank lines at the bottom are causing content to scroll off my screen.
atsaloli commented
I can work around it with GNU head:
[root@localhost source]# mdless /tmp/example.md | head -n -4
header ============================================================================================================================================================================================================
text
[root@localhost source]#
ttscoff commented
Version 1.0.17 is pushed for gem update
now, and should remove at least the extra space at the top.