# Confluence Migration: \<code\> Tag not migrated

**URL:** <https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847>\
**Category:** Help / Discuss\
**Tags:** confluence, migration, html\
**Created:** [February 2, 2023, 5:33pm UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847 "2023-02-02T17:33:53Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [February 2, 2023, 5:33pm UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/1 "2023-02-02T17:33:53Z")

</div>

I’m currently evaluating the migration of our Confluence instance (7.19.2) to an XWiki instance (14.10) by using the migrator tool.

We have loads of inline code styling all over our Confluence pages (produced by applying “Preformatted code” in Confluence WYSIWYG-Editor, resulting in `<code>my text</code>` elements). These tags get lost during migration. Is there anything I can do about it to preserve these or transform them to `<mark></mark>`?

As I’m novice to the magic world of XWiki, I do not know enough about input and output formats. I would assume that feeding a Confluence XML would result in XWiki-Markup, which keeps these tags.

Any hint or nudge into the right direction would be highly appreciated.

Thank you! 🙂

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 3, 2023, 8:02am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/2 "2023-02-03T08:02:56Z")

</div>

I just checked, and I can indeed confirm you that there is no specific handling of the `<code>` element (so you get the content of it but the fact that it’s a code block is lost).

Does not seem too hard to support. The best would be to create an issue on [Loading...](https://jira.xwiki.org/projects/CONFLUENCE) with a package to reproduce the issue (an information on how it’s supposed to behave on Confluence side is nice too) and make sure of how the source to support looks like.

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [February 3, 2023, 8:43am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/3 "2023-02-03T08:43:35Z")

</div>

Hey Thomas, thanks for your fast reply. Will open a ticket today over at JIRA. Since I’m new to this: what do you mean by “package to reproduce the issue”? I assume it’s a XAR, but what should go into? Is there any documentation on how to handle this? Thanks again 🙂

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 3, 2023, 8:51am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/4 "2023-02-03T08:51:53Z")

</div>

> [@johlton](#):
>
> what do you mean by “package to reproduce the issue”?

I mean a Confluence package to reproduce the same problem, so that I can look at the exact Confluence content to parse and make sure it’s fixed.

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [February 3, 2023, 9:37am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/5 "2023-02-03T09:37:22Z")

</div>

OK, understood! I just opened a ticket over at JIRA: [Loading...](https://jira.xwiki.org/browse/CONFLUENCE-120)  
Thanks for your assistance and patience! 🙂

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 3, 2023, 9:54am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/6 "2023-02-03T09:54:40Z")

</div>

Thanks, one last question to implement it since I have a hard time finding documentation about “inline code formatting”: in your experience, is code inside it ever colored, or it’s just a box with monospaced characters ?

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [February 3, 2023, 10:36am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/7 "2023-02-03T10:36:06Z")

</div>

Actually, its only style on the Confluence side is font-related only and without color (nothing fancy regarding syntax highlighting):

```auto
font-family: SFMono-Medium,SF Mono,Segoe UI Mono,Roboto Mono,Ubuntu Mono,Menlo,Courier,monospace;

```

But we use the `<code>`-tag to apply our own CSS to it, in our case:

```auto
code {
        border-radius: 5px;
        color: #000;
        padding: .275em;
        border-radius: 5px;
        font-size: .9em;
        margin : 0 0.2em 0 0.2em;
        top: -1px;
}

```

I’ll add that to the ticket as well. Thank you!

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 3, 2023, 5:45pm UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/8 "2023-02-03T17:45:40Z")

</div>

A Confluence syntax parser 9.18.0 with support for `<code>` tag is not released.

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [February 3, 2023, 6:13pm UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/9 "2023-02-03T18:13:38Z")

</div>

I assume you meant _now_? 😉 Thank you for your work! Really appreciate this! I already checked via extension updater but I guess it takes its time upstream for the next version. Looking forward!

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [February 4, 2023, 8:05am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/10 "2023-02-04T08:05:34Z")

</div>

> [@johlton](#):
>
> I already checked via extension updater but I guess it takes its time upstream for the next version

Actually there was a problem with the release and I had not noticed. Now it’s available.

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [February 4, 2023, 10:32am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/11 "2023-02-04T10:32:01Z")

</div>

Dear Thomas, I just tried and it works fine. Merci beaucoup!

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [March 3, 2023, 11:00am UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/12 "2023-03-03T11:00:31Z")

</div>

Dear @tmortagne , it broke again, I added [Loading...](https://jira.xwiki.org/browse/CONFLUENCE-123) - thanks for having a look!

---

<div class="post-metadata">

**Author:** ![tmortagne](https://forum.xwiki.org/user_avatar/forum.xwiki.org/tmortagne/32/4930_2.png) [@tmortagne](https://forum.xwiki.org/u/tmortagne)\
**Post date:** [March 3, 2023, 2:49pm UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/13 "2023-03-03T14:49:33Z")

</div>

Should be OK now (in 9.19.1).

---

<div class="post-metadata">

**Author:** ![johlton](https://forum.xwiki.org/user_avatar/forum.xwiki.org/johlton/32/4954_2.png) [@johlton](https://forum.xwiki.org/u/johlton)\
**Post date:** [March 3, 2023, 3:14pm UTC](https://forum.xwiki.org/t/confluence-migration-code-tag-not-migrated/11847/14 "2023-03-03T15:14:49Z")

</div>

Thank you for the superfast fix!
