Title: Word-wrap problem in Code block
Last modified: January 26, 2019

---

# Word-wrap problem in Code block

 *  Resolved [ronisbr](https://wordpress.org/support/users/ronisbr/)
 * (@ronisbr)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/word-wrap-problem-in-code-block/)
 * Hi!
 * This new version is really awesome, fixed a lot of issues 🙂
 * However, I am having another problem related to the word-wrap option. I change
   my default `wp-block` width by the following code:
 *     ```
       .wp-block {
         max-width: 800px;
       }
       ```
   
 * and I am also using the following settings of CodeMirror (otherwise, I got that
   bug related to line-height):
 *     ```
       .CodeMirror pre {
         margin: 0;
         padding: 0 0 0 5px;
         border: none;
       }
       ```
   
 * However, the plugin in Guttemberg seems to be considering the original width 
   of wp-block to compute the block height when word-wrapping is on. Take a look
   to what I see when I open a post:
 * > [View post on imgur.com](https://imgur.com/a/ynuOBdY)
 * If I turn off and on the word-wrap option, or just delete the last character,
   then the width changes to the correct size.
    -  This topic was modified 7 years, 2 months ago by [ronisbr](https://wordpress.org/support/users/ronisbr/).

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [maximebj](https://wordpress.org/support/users/maximebj/)
 * (@maximebj)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/word-wrap-problem-in-code-block/#post-11138474)
 * Hi!
 * I’ve already seen this but when I save the post and reload page it’s gone.
 * But it needs investigations, I’ll take a look ah this !
 *  Plugin Author [maximebj](https://wordpress.org/support/users/maximebj/)
 * (@maximebj)
 * [7 years ago](https://wordpress.org/support/topic/word-wrap-problem-in-code-block/#post-11398341)
 * I still has the issue sometimes but it’s only on backend.
 * But for now I’m unable to fix this for good. I’m closing this issue, but it’s
   on my roadmap to find a true fix for that !

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Word-wrap problem in Code block’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/advanced-gutenberg-blocks_333834.
   svg)
 * [Advanced Gutenberg Blocks](https://wordpress.org/plugins/advanced-gutenberg-blocks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/advanced-gutenberg-blocks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/advanced-gutenberg-blocks/)
 * [Active Topics](https://wordpress.org/support/plugin/advanced-gutenberg-blocks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/advanced-gutenberg-blocks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/advanced-gutenberg-blocks/reviews/)

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [word wrap](https://wordpress.org/support/topic-tag/word-wrap/)

 * 2 replies
 * 2 participants
 * Last reply from: [maximebj](https://wordpress.org/support/users/maximebj/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/word-wrap-problem-in-code-block/#post-11398341)
 * Status: resolved