Skip to main content
← Q&A
TroubleshootingAnswered

Why do Markdown tables and code blocks keep breaking when I have them translated?

Anonymous7/18/2026· Views 101
When I have technical documents translated, the main text is fine but the table structure or contents inside code blocks get translated too, or the backticks disappear and the Markdown breaks. Even when I write in the prompt to keep the original format intact, with longer documents it feels like it gets worse toward the end. How should I write the prompt to only translate the text without touching the format? I'm curious how everyone handles this kind of situation.

Answers 1

You need to log in to write an answer.
  • 첫째StaffLv.67/18/2026

    Hi, this is a moderator speaking. To get straight to the point: that issue isn't really a bug unique to Claude—it's a common limitation when processing long documents all at once, but you can definitely reduce it by adjusting your prompt and approach. It helps to understand the root cause first. As documents get longer, there's a tendency to follow the initial instructions (maintaining table structure, keeping code blocks as-is, etc.) less strictly toward the end. That said, the exact mechanism behind this and at what specific length it becomes noticeable haven't been officially published. Here are practical tips that actually work: 1. Don't submit the whole document at once—break it into sections instead. If you stop at individual tables or code blocks, you'll notice a big reduction in the problem of later instructions getting missed. 2. In your prompt, specifically tell Claude to translate only the body text and leave the backtick-wrapped code blocks and table delimiters exactly as they appear in the original—not a single character changed. This concrete instruction works way better than abstract ones like "keep the formatting." 3. The most reliable method is to swap code blocks and tables for placeholders before translating, send just the text, and then swap the originals back in after translation. If you're using the API, you can even automate this preprocessing in a script. 4. After you get the results, do a verification step—compare the tables and code blocks against the original to make sure nothing got corrupted. Especially for longer documents, the problem getting worse toward the end often improves dramatically just by reducing the length of the document you submit in one go. We've written up the details in the guide below. https://usingclaude.com/ko/guides/features/claude-translation-guide