# Bug OP-5115 - WYSIWYG is adding new line to the code snippet each time the wiki page is saved

Project: OpenProject
Status: closed
URL: https://community.openproject.org/work_packages/OP-5115

## Open points

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Date |  |
| Priority | Medium |
| Module |  |
| Target versions | 8.0.1 |
| Observed in versions | 8.0.0 |
| Sprint | 8.0.1 |
| Backlog bucket |  |
| Bug found in version (deprecated) | 8.0.x |
| Found in mobile app version |  |
| Follow-up feedback e-mail |  |
| Requires doc change | No |
| Accessibility | No |
| Pull preview |  |
| List |  |
| Labels |  |

## People

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Product manager |  |
| Developers |  |
| Designer |  |
| Ordered by |  |
| Signed off by |  |
| Interest by |  |

## Planning

| Attribute | Value |
| --- | --- |
| Relevance |  |

## Costs

| Attribute | Value |
| --- | --- |
| Votes |  |
| Work |  |
| Labor costs |  |

## Description

# Preconditions to reproduce the bug

Any module with WYSIWYG editor (Wiki, Work Packages, etc.) is enabled

# Steps to reproduce the bug

1\. Create a new Work Package.

2\. Insert code snippet  with WYSIWYG :

![](/api/v3/attachments/14394/content)

3\. Save the work package

You should see something like this

![](/api/v3/attachments/14395/content)

4\. Click on the description and save again (not changing anything)

# Actual behaviour

Each time the Work Package (or a wiki page) is saved, a new empty line is being added in the code snippet:

![](/api/v3/attachments/14396/content)

![](/api/v3/attachments/14397/content)

So it's very inconvenient to edit a page that is containing a code snippet, even though your changes have nothing to do with it

# Expected behaviour

A new line inside a code snippet should not be added
