-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Single Line Comments in Language Block Codes are hidden #69
Comments
You can fix this with this workaround:
Change this: What it does:
|
👍 Thank you @MAWSpitau for this workaround. |
🧐 I will try to build a CSS selector to only target/hide the Todoist comments. |
I have a CSS rule handy to hide the start and end Obsidian comment surrounding the .cm-line:not(:hover):not(.cm-active) > .cm-comment.cm-comment-start:has(~ .dataview.inline-field > .dataview.inline-field-key[data-dv-key="todoist_id"]),
.cm-line:not(:hover):not(.cm-active) > .cm-comment.cm-comment-start:has(~ .dataview.inline-field > .dataview.inline-field-key[data-dv-key="todoist_id"]) ~ .cm-comment.cm-comment-end
{
display: none;
} ✅ This fixed the issue for me, it:
It is brittle because it depends on the CSS classes of the Tasks Obsidian plugin. @MAWSpitau and anyone else interested, let me know if this works for you. |
Fixes an issue where non-Todist single line comments (Java, Ruby, HTML...) were hidden. See HeroBlackInk#69 (comment)
I also see this, so I like having a fix. Thank you! Regarding the final fix, I know my preferences are just that, mine, but I thought I'd share them just in case they are useful.
On a related note, I'm not sure if it's my mistake or some bug but I'm always able to see the todoist_id in edit mode, though the |
👏 First off thank you @HeroBlackInk for this useful plugin.
I noticed the following issue.
Summary
When editing a note with a single-line comment in a language code block, with
Ultimate Todoist Sync for Obsidian
plugin enabled, then the comment is not shown (whatever the value ofEditing Mode
(Live Preview
orSource mode
)).Description of the Issue
When I type this in an Obsidian note:
Then I expect, the
// Single-line comment
to be shown in the editor, like so// Single-line comment
❌ Whereas it is not when
Ultimate Todoist Sync for Obsidian
is enabled whatever the value ofEditing Mode
(Live Preview
orSource mode
), and I get this instead.FYI, the issue is the same for a single-line comment in a Ruby code block.
✅ When I disable the
Ultimate Todoist Sync for Obsidian
plugin, the comment is shown as expected.How to Reproduce this Issue?
Ultimate Todoist Sync for Obsidian
pluginThe text was updated successfully, but these errors were encountered: