Skip to content

Word wrap in code blocks - #2595

Closed
syco wants to merge 2 commits into
marktext:developfrom
syco:develop
Closed

syco wants to merge 2 commits into
marktext:developfrom
syco:develop

Conversation

@syco

@syco syco commented Jun 2, 2021

Copy link
Copy Markdown
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

consal commented Aug 30, 2021

Copy link
Copy Markdown

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

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

setWrapCodeBlocks(wrapCodeBlocks);

Copy link
Copy Markdown
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

Jocs commented Dec 26, 2021

Copy link
Copy Markdown
Member

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?

Comment thread static/preference.json
"codeFontFamily": "DejaVu Sans Mono",
"codeBlockLineNumbers": true,
"trimUnnecessaryCodeBlockEmptyLines": true,
"wrapCodeBlocks": true,

Copy link
Copy Markdown
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

fxha commented Dec 28, 2021

Copy link
Copy Markdown
Contributor

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

Jocs commented Jan 3, 2022

Copy link
Copy Markdown
Member

@syco Please solve this conflicts and comments.

@syco

syco commented Jan 3, 2022

Copy link
Copy Markdown
Author

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