MarEng
MarEng

Reputation: 308

Wrap off just some markdown blocks

Right now, when writing markdown in visual studio I have the configuration to wrap words according to the view port, and this is just fine, but sometimes I have to insert some base64 codes that have more than 200000 characters.

The base64 lines fill pages and pages with "useless" information.

Sample with base 64 with wrap on

Ideally, I want to achieve something similar to this in an automatic way or something close to it:

enter image description here

As you can see, the objective is to have "wrap on" for the information and the "wrap off" for the base 64 information.


So the point is to understand if there is a way to wrap off just some blocks and keep the wrap on viewport for the rest of the information

I thought in some workarounds

but enable to get some success with it.

Right now, I have a pretty straight configurations in my settings.json (nothing is overriding the markdown section)

"[markdown]": {        
        "editor.wordWrap": "on",
        "editor.defaultFormatter": "darkriszty.markdown-table-prettify",
    },

Let me know if someone had the same problem and managed to workaround this situation

Feel free to ask for further information

Thanks in advance,

Upvotes: 1

Views: 426

Answers (1)

M.H. Tajaddini
M.H. Tajaddini

Reputation: 820

I suggest you wrap it in <div> ... </div>, since it does not have any effect on your document, and then fold it. You can fold the text in VSCode with Ctrl + Shift + [ or by pressing F1 and typing fold, selecting it while having your line cursor inside the div.

Here's a very nice answer as well.

Upvotes: 4

Related Questions