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

Word wrap in code blocks #2595

Closed
wants to merge 2 commits into from
Closed

Word wrap in code blocks #2595

wants to merge 2 commits into from

Conversation

syco
Copy link

@syco syco commented Jun 2, 2021

Q A
Bug fix? no
New feature? yes
Breaking changes? no
Deprecations? no
New tests added? not needed
Fixed tickets Fixes #2496
License MIT

Description

[Description of the bug or feature]
image

@consal
Copy link

consal commented Aug 30, 2021

Is there any chance this could be moved forward? Thanks!

@fxha fxha changed the title Fix https://github.com/marktext/marktext/issues/2496 Word wrap in code blocks Dec 22, 2021
@fxha fxha requested a review from Jocs December 22, 2021 21:01
@@ -751,6 +759,8 @@ export default {

document.addEventListener('keyup', this.keyup)

setWrapCodeBlocks(wrapCodeBlocks);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the semicolon.

@Jocs
Copy link
Member

Jocs commented Dec 26, 2021

Very useful feature, I am just not sure that this feature will be implemented in the render process? It should still be implemented in muya?. From a long-term perspective, it is better to implement in muya, but muya is being refactored recently, which will lead to repeated development. If it is implemented in the render process, then when a new muya is transplanted, it will also involve the corresponding Changes. Of course, in the short term, this is not a problem. @syco @fxha What's your opinion?

@@ -19,6 +19,7 @@
"codeFontFamily": "DejaVu Sans Mono",
"codeBlockLineNumbers": true,
"trimUnnecessaryCodeBlockEmptyLines": true,
"wrapCodeBlocks": true,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrapCodeBlocks should be false by default to keep the old behavior.

@fxha
Copy link
Contributor

fxha commented Dec 28, 2021

Very useful feature, I am just not sure that this feature will be implemented in the render process? It should still be implemented in muya?.

Muya for sure because the content is created and manipulated by Muya.

@Jocs
Copy link
Member

Jocs commented Jan 3, 2022

@syco Please solve this conflicts and comments.

@syco
Copy link
Author

syco commented Jan 3, 2022

Sorry, but I'm no longer using marktext.
This has to go back to marktext's devs.
I can leave the pull request open for reference, but I'm out.

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.

Word wrap in code blocks
4 participants