Problem to export PDF

Bug report

  1. Write the text below to the editor.
    # test

    ```
    % ls -1 |
        grep '\.txt$' |
        head -n 1
    ```

Preview is nice.
But I can not see all code on the PDF which is exported from File -> Export -> As PDF.
After character $, it seems that some characters are disappeared.

Info

  • Platform: Windows
  • Platform version: Sorry I have no idea where to see this information.
  • App Version: 5.1.2

Reproduce

Always.

Hi Saito-san,

Thank you for reporting it.
That’s weird.
I could reproduce it with this:

```
'$'
```

but doesn’t with this:

```
"$"
```

I’ll look into it.

1 Like

Got it. That was due to the special replacement patterns:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace#Specifying_a_string_as_a_parameter

So, when you call string.replace(), the $' inserts the portion of the string that follows the matched substring.
Will fix it in the next release!

1 Like

Fixed in v5.2.0:tada: Thanks again for reporting!