obsidian-export icon indicating copy to clipboard operation
obsidian-export copied to clipboard

[Feature Request] Create tag to partially ignore content within a file.

Open 0xForerunner opened this issue 2 years ago • 3 comments

I'm a DND dungeon master and often find myself wanting to hide only some information within a file. Here is an example of how it could look.

# Interesting Title

Here is some information I want to be exported.

%% BEGIN-EXPORT-IGNORE %%
Here is some information I want hidden.
%% END-EXPORT-IGNORE %%

Here is some other public info.

0xForerunner avatar Aug 07 '23 06:08 0xForerunner

If I could get a green light from the maintainer id be happy to start working on a PR. I imagine this should be pretty simple.

0xForerunner avatar Aug 07 '23 21:08 0xForerunner

In order to accept and incorporate something like this (which I am not at all opposed to in principle), I would prefer to first see generic support for Obsidian's comment syntax, which has been on my wishlist for quite some time, but so far never took the time to try and implement.

Specifically, I would be thinking of two (three?) modes, where either:

  1. Comments are dropped entirely.
  2. Comments are converted to <!-- HTML comments -->
  3. (Comments are left as-is, like now?)

That alone might perhaps even reasonably solve what you're trying to accomplish? If not, after that's supported, I would not mind exploring ways to use comment markers to add more processing logic.

zoni avatar Aug 09 '23 11:08 zoni