silverbulletmd / silverbullet

The hackable notebook
https://silverbullet.md
MIT License
2.01k stars 138 forks source link

Trimming empty lines at end of files #859

Closed bilogic closed 4 days ago

bilogic commented 1 month ago
\```query
page
where name =~ /^Journal\/Day\//
render [[Custom/Journal]]
order by name desc
\```

I currently use the above to generate a long journal page that joins all my daily entries, the problem is, if these daily entries have empty lines at the end, it creates these ugly gaps in the journal page, anyway to automatically trim them?

zefhemel commented 1 month ago

Does your Custom/Journal template have a newline at the end too? Another way to get a bit more control over the rendering is to use render all instead of render, see: https://silverbullet.md/Query%20Language (bottom)