Exporting to PDF Highlights Words

phi.fibonacci's Avatar


23 Sep, 2020 04:07 PM

When I export my MD documents to PDF a few "random" words in the PDF are highlighted yellow (acronyms or abbreviations with variable case seem to trigger this). At first, I thought it was because I had grammar and spelling checks switched on but I've switched those settingsl off and the highlighting still happens. The words do not appear highlighted in app, just in the output. Does anyone else have this? Is there a setting I'm not seeing so that no extra markup get's carried over to the final document?

  1. Support Staff 1 Posted by Brett on 23 Sep, 2020 04:25 PM

    Brett's Avatar

    Could you attach a document that causes the issue for testing purposes? Also let me know which Style you're using.

    - Brett

  2. 2 Posted by phi.fibonacci on 23 Sep, 2020 07:05 PM

    phi.fibonacci's Avatar

    Ok... so when you asked me for a test file (test.md) I took an excerpt from one of my documents with the problems. I checked to make sure it was displaying the same behavior. It did not (the original PDF was clean).! I then turned on spell check and exported a second time (resulting file is test.pdf). The highlight is present. I turned off spell check and exported a third time (resulting file is test2.pdf). The highlight was still present. So... it seems that on the initial export (if spell check is off) everything comes out clean. On all subsequent exports I get the highlighting. If needed, I can put together a screen recording demonstrating.

  3. 3 Posted by phi.fibonacci on 23 Sep, 2020 07:41 PM

    phi.fibonacci's Avatar
  4. Support Staff 4 Posted by Brett on 24 Sep, 2020 01:54 PM

    Brett's Avatar

    Ok, this is happening because Marked uses the <mark> tag for highlighting errors in the preview, and then isn't removing that tag when generating the PDF. This is due to a relatively recent change, but I'm surprised it hasn't been reported before.

    I've fixed it for the next update. In the meantime, you can correct the behavior using Preferences->Style->Additional CSS. Insert (or add) the following:

    @media print {
        .mkcolor-grammar-error,.mkcolor-spell-error {
          background: none;
          border-bottom: none;


  5. 5 Posted by phi.fibonacci on 24 Sep, 2020 04:22 PM

    phi.fibonacci's Avatar

    Glad I was able to bring to your attention. Thank you so much for the prompt response!

    Take care.

  6. Brett closed this discussion on 25 Sep, 2020 04:16 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac