Title: Plugin doesn&#8217;t preserve pre tags
Last modified: April 18, 2020

---

# Plugin doesn’t preserve pre tags

 *  [macnux](https://wordpress.org/support/users/macnux/)
 * (@macnux)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/)
 * Hi,
 * I noticed that the plugin doesn’t preserve pre tags which include code snippets.
   
   Is there is a chance to include this as a feature in your next version?
 * Regards,

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

 *  Plugin Author [Michael Williamson](https://wordpress.org/support/users/michaelwilliamson/)
 * (@michaelwilliamson)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12694211)
 * How are the pre tags included in the original document? Are there
 *     ```
        tags literally included in the text? Could you provide a minimal example document?
       ```
   
 *  Thread Starter [macnux](https://wordpress.org/support/users/macnux/)
 * (@macnux)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12695619)
 * Actually yes! I typed them literally as a text
    Because I can’t add pre tags 
   as HTML pages in a word doc. Is there any solution for that?
 * Best Regards,
 *  Plugin Author [Michael Williamson](https://wordpress.org/support/users/michaelwilliamson/)
 * (@michaelwilliamson)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12696369)
 * I’m afraid not. The approach that others have taken is to apply a custom Word
   style to the code block, and then to map that Word style into appropriate HTML.
   For instance, the style mapping might look something like
 * `p[style-name='Code Block'] => pre.code-block:separator('\n')`
 *  Thread Starter [macnux](https://wordpress.org/support/users/macnux/)
 * (@macnux)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12696743)
 * I’m sorry, one final question.
    Can you add an option to make image alt text 
   and description from its name? It would be a good feature for this time-consuming
   process for tens of images in some cases.
 * Best Regards,
 *  Plugin Author [Michael Williamson](https://wordpress.org/support/users/michaelwilliamson/)
 * (@michaelwilliamson)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12696762)
 * The names of images often unintentionally leak information that the authors didn’t
   mean to include in the output. If you set the alt text on the image instead, 
   that should be carried across to the output.
 *  Thread Starter [macnux](https://wordpress.org/support/users/macnux/)
 * (@macnux)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12696769)
 * Thank you very much for your great response!
    Have a great day!

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

The topic ‘Plugin doesn’t preserve pre tags’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/mammoth-docx-converter.svg)
 * [Mammoth .docx converter](https://wordpress.org/plugins/mammoth-docx-converter/)
 * [Support Threads](https://wordpress.org/support/plugin/mammoth-docx-converter/)
 * [Active Topics](https://wordpress.org/support/plugin/mammoth-docx-converter/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mammoth-docx-converter/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mammoth-docx-converter/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [macnux](https://wordpress.org/support/users/macnux/)
 * Last activity: [6 years, 4 months ago](https://wordpress.org/support/topic/plugin-doesnt-preserve-pre-tags/#post-12696769)
 * Status: not resolved