You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes, I want to format my H1s with some markdown. For instance,
# [TKT-123](https://company-bug-tracker/TKT-123)
or
# A Night at the Cinema with _Agent Cody Banks_
Currently, Filename Heading Sync will rename the file TKT-123(https...).md, etc. I think it would be sensible in such cases for the plugin to strip the markup before applying the filename.
One complication is that when re-opening that file, the plugin would now revert the heading to its bare form, to match the stripped filename. I'd like to propose the following logic around this new feature:
When updating a heading: set the filename to the rendered (visible) text of the first H1 element.
When opening an existing file: first, check if the H1 contains NO markdown (perhaps by comparing the raw and rendered versions of the H1)
if so, proceed as usual
if not, check if the rendered text and the filename match.
if so, skip
if not, raise a window.alert (is this even possible?) to prompt the user re: whether to keep or update the heading. Additionally, define a config option to specify this behavior.
When opening a new file: no changes required.
Thoughts?
Thanks for a very handy, unobtrusive, and common-sense utility. Should really be a core plugin. 🙏
The text was updated successfully, but these errors were encountered:
Sometimes, I want to format my H1s with some markdown. For instance,
# [TKT-123](https://company-bug-tracker/TKT-123)
or
# A Night at the Cinema with _Agent Cody Banks_
Currently, Filename Heading Sync will rename the file
TKT-123(https...).md
, etc. I think it would be sensible in such cases for the plugin to strip the markup before applying the filename.One complication is that when re-opening that file, the plugin would now revert the heading to its bare form, to match the stripped filename. I'd like to propose the following logic around this new feature:
window.alert
(is this even possible?) to prompt the user re: whether to keep or update the heading. Additionally, define a config option to specify this behavior.Thoughts?
Thanks for a very handy, unobtrusive, and common-sense utility. Should really be a core plugin. 🙏
The text was updated successfully, but these errors were encountered: