Skip to content
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

BUG: Audio Player plugin breaks code block comments formatting #22

Open
keerah opened this issue Feb 24, 2023 · 12 comments
Open

BUG: Audio Player plugin breaks code block comments formatting #22

keerah opened this issue Feb 24, 2023 · 12 comments
Labels
bug Something isn't working
Milestone

Comments

@keerah
Copy link

keerah commented Feb 24, 2023

Once I enable Audio Player my code block formatting gets broken in reading view.
All code comment lines get formatted in tall columns of 8 symbols in length.

@jacob7395
Copy link

can you post an example of a block that breaks, before the plugin is enabled?

@keerah
Copy link
Author

keerah commented Mar 2, 2023

for %%x in (%*) do (
   set /A argCount+=1
   REM argument x file name
   set "argVec[!argCount!]=%%~x" 
   REM argument x name without file extension
   set "argVn[!argCount!]=%%~nx" 
)

Looks like this
image

@noonesimg
Copy link
Owner

Sorry, I cant reproduce this bug.
Can you provide more info?
What kind of syntax highlighter are you using?
Have you tried to uninstall and reinstall the plugin?

@noonesimg noonesimg added the bug Something isn't working label Mar 5, 2023
@keerah
Copy link
Author

keerah commented Mar 6, 2023

Yes, I've tried.
Also tried to disable all of the plugins except this one.
It's not just some particular highlighter, it affects all code blocks in my vault in all languages.
No luck, can't use it, unfortunately

@noonesimg
Copy link
Owner

That's weird. What version of obsidian are you using? What OS?

@keerah
Copy link
Author

keerah commented Mar 6, 2023

Windows 11
Obsidian is latest 1.1.16

@noonesimg
Copy link
Owner

Thanks, If possible, can you create a new vault and reproduce this issue?

@keerah
Copy link
Author

keerah commented Mar 6, 2023

Yes, same story in the new one

@noonesimg
Copy link
Owner

Can you check the dev-tools console? (Ctrl+Shift+I)
are there any error messages related to the issue?

Tbh, I'm kinda lost here. No Idea, why obsidian would invoke any functionality of my plugin,
unless the code block is marked as audio-player

@keerah
Copy link
Author

keerah commented Mar 6, 2023

I was messing with the console with the plugin on/off
And here's the difference
The plugin off:
image
The plugin on:
image
And the editor view displays this grid, which is the source of the problem
image
This might give a clue perhaps

@noonesimg
Copy link
Owner

This is it! Thank you. Will fix in an upcoming version

@noonesimg noonesimg added this to the 0.1.2 milestone Mar 6, 2023
@Emperyal
Copy link

Emperyal commented Aug 22, 2023

I also encountered this problem and found a solution through different naming conventions. First, open the CSS file of the plugin and change the .comment classes to a different name. For example, I replaced them with .audioplayer-comment. Additionally, I modified the .comment-list classes by adding "audioplayer-" as a prefix. Next, open the main.js file and locate the variable that adds the "comment" class. Replace it with the new class that you've chosen. This line var _hoisted_1 = { class: "comment" }; needs to be modified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants