Automattic / Automattic/syntaxhighlighter

Copying Syntax Highlighter code will add spaces

Open
#253 2 comments 0 reactions 0 assignees View on GitHub
[Type] Bug
Dominant language
CSS
Stars
251
Forks
81
PR merge metrics
No merged PRs in 30d

Description

Reported in here: https://wordpress.org/support/topic/works-but-if-you-copy-code-and-wan-to-to-use-it-show-error/

>It works and show code beautifully on pages, But if you copied that code and want to use it, the it shows errors, Looks like it add some spaces,

>I tried it with php shorcode, and when i copied the code from the frontend of the page, It gives Parse error: syntax error, unexpected…

Our development team was able to reproduce this issue in Python:

>Putting the following code in Syntax Highlighter, updating the post, copying the code to a new .py file and trying to run it shows that Syntax Highlighter is, indeed, adding some invisible characters to the code.

We also figured it out that the code works successfully on Chrome, but it crashes on Firefox.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.