Skip to content

Conversation

@iamanaws
Copy link
Contributor

No description provided.

@iamanaws iamanaws force-pushed the feature/code-block-syntax-highlighting branch 2 times, most recently from 7fa0207 to 6fe85de Compare November 26, 2025 04:44
@iamanaws iamanaws force-pushed the feature/code-block-syntax-highlighting branch from c3936a9 to 9057ced Compare November 26, 2025 04:57
@iamanaws iamanaws force-pushed the feature/code-block-syntax-highlighting branch from 9057ced to 5b7602a Compare November 26, 2025 06:11
@nienow
Copy link
Owner

nienow commented Dec 2, 2025

Hi @iamanaws and thank you for the pull request. This will be a useful feature. Just one question:

Instead of having two icons for code in the toolbar, I'm wondering if its better to just switch the original "code"icon to add a "code-block". The original "code" doesn't seem that useful, and we can leave the markdown shortcut of "`" if someone wants to use it.

Other than that, I will need to test more when I have time, but it looks good so far.

@iamanaws iamanaws force-pushed the feature/code-block-syntax-highlighting branch from a518f67 to 4851725 Compare December 3, 2025 04:20
@iamanaws
Copy link
Contributor Author

iamanaws commented Dec 3, 2025

Instead of having two icons for code in the toolbar, I'm wondering if its better to just switch the original "code"icon to add a "code-block". The original "code" doesn't seem that useful, and we can leave the markdown shortcut of "`" if someone wants to use it.

@nienow sure, it's done!

take your time, thanks

@nienow
Copy link
Owner

nienow commented Dec 6, 2025

what is the reason for the 5000 length limit for using code highlighting? Were you seeing any performance issues?

@iamanaws
Copy link
Contributor Author

iamanaws commented Dec 6, 2025

what is the reason for the 5000 length limit for using code highlighting? Were you seeing any performance issues?

I haven't done deep testing, but it has been a problem with other plugins in the past, so I'm just trying to prevent it.
I could review that better to analyze the impact

Syntax highlighting is disabled until we figure out performance issue:
standardnotes/markdown-pro#20 (comment)

standardnotes/plugins#41

@nienow
Copy link
Owner

nienow commented Dec 6, 2025

I did some quick performance testing, and it does slow down around 30000 characters for me on my desktop, so I think 5000 is appropriate to account for slower devices. I will merge and we can always improve it later. Thanks again.

@nienow nienow merged commit bb853ec into nienow:main Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants