mcndt / noteshare.space

A service for sharing encrypted Markdown notes from Obsidian. Notes are end-to-end-encrypted and are only stored temporarily.
https://noteshare.space
MIT License
202 stars 19 forks source link

[Feature request] Omit displaying of 1st markdown header if identical with filename #52

Open MaxMoldmann opened 11 months ago

MaxMoldmann commented 11 months ago

Is your feature request related to a problem? Please describe. For many Markdown users it is very common to have a 1st header that is identical with the filename. There is even an Obsidian plugin to achieve this (Filename Heading Sync) and you can achieve this also using the Template and the Templatr plugin. Noteshare will then display the same text twice - first the file title then the first Markdown heading. This is a bit annoying and looks unprofessional when I use Noteshare.

Describe the solution you'd like

  1. If after frontmatter properties and empty lines there is no text in front of the first header
  2. then do a simple comparison of file title and the 1st Markdown heading
  3. Omit displaying of either file title or first header if equal Nobody will miss the double text line if it isn't there. The raw markdown would be unaffected, I think this is a win-win situation for every case.

Describe alternatives you've considered Behavior could be configurable, but this adds usage complexity and the above heuristic solves the problem in a silent and elegant way.

Additional context DoubleHeadline