Open Salamander230 opened 2 months ago
While implementing a solution to this problem, I ran into the following problem: How should the formatting of such a match be handled? I cannot add additional formatting within a contiguous virtual link that is already formatted as a link element.
Is it okay if the formatting disappears? Or should it be displayed in source code style?
I think keeping the formatting would be best.
Perhaps the solution to this can be to split up the whole link for a match into individual links within each piece of contiguously formatted text (this way the formatting encases individual link parts instead of being inside one big virtual link).
The whole match can then be wrapped in one span
element that can be targeted by css to behave as if it's one whole link on hovering or clicking (even though the span
element technically isn't a link, but all it's individual parts are).
For example, in the source code:
<span><a><b>This</b> is a link</a></span>
would become:
<span><b><a>This</a></b><a> is a link</a></span>
Also, using the example I gave earlier:
**DNA** ==**replication**== enzymes are required for <u>DNA replication</u>
would be formatted as the following, given the recognized phrases DNA replication enzymes
and DNA replication
:
<span><b><a>DNA</a></b><a> </a><mark><b><a>replication</a></b></mark><a> enzymes</a></span> are required for <span><u><a>DNA replication</a></u></span>
Sounds good 👍🏻 But it will be some time before I find the time to implement it
No worries. Thank you for your work :)
I was wondering if it can be possible to match aliases/filenames while ignoring formatting (like bold, italic, underline, highlight, strikethrough, etc.)
For example, in the phrase
**DNA** ==**replication**== enzymes are required for <u>DNA replication</u>
, the recognized phrases would beDNA replication enzymes
andDNA replication
if they are aliases/filenames in the vault.Thanks again for your work on this wonderful plugin :)