mrjackphil / obsidian-text-expand

A simple text expand plugin for Obsidian.md
186 stars 12 forks source link

Feature Request: Strip Comments For $lines:xxx Macro #48

Open alexgeirby opened 3 years ago

alexgeirby commented 3 years ago

Hi! First of all, thank you for $count macro, it works great!

I have another suggestion for implementation. Right now, when I use $lines:XXX macro, it returns XXX first lines from the file except YAML frontmatter block and empty lines at the beginning of the file. I suggest deleting the multi-line comment as well if it is located at the beginning of the file, i.e. if first line of the file (after stripping yaml and empty lines) starts with %%, strip all lines until next %% is found.