Copy and Paste of Certain Code Blocks in Exported PDF not working properly

When I copy and paste code blocks of type “shell”, “python”, “yaml”, and probably many more from an exported PDF file of my obsidian notes, it is pasting incorrectly with duplicate entries of each letter/character.

Steps to reproduce

  1. Insert the following into a Obsidian Note:

# This is shell code block format.
ls -lrth
# This is python code block format.
test = ""
# This is YAML code block format.
test: "value"
# This is default code block format.
ls -lrth

  1. Export to PDF using the in-built feature.

  2. Open PDF and copy and paste code block from PDF to terminal or notepad.

Expected result

Copy and paste of code block works, where if i copy ‘ls -lrth’ i should paste and get ‘ls -lrth’ for each different type of code block formatting.

Actual result

Copy and paste of code block for any type aside from default code block ``` results in duplicate text.

If i copy ‘ls -lrth’ from PDF, and paste i get ‘llss --llrrtth’. This is happening for the shell/python/yaml code block formatting.

Environment

  • Operating system: Windows 10
  • Obsidian version: v0.12.12
  • Plugins: Disabled

Additional information