Automattic / google-docs-add-on

Publish to WordPress from Google Docs
GNU General Public License v3.0
165 stars 21 forks source link

Syntax highlighting is broken #114

Closed o-simardcasanova-net closed 3 years ago

o-simardcasanova-net commented 5 years ago

Hi,

I tried to use Google Docs on a technical blog where I need math and syntax highlighting. This add-on is phenomenal, and could be extremely useful for my workflow. But when I turn my Google Docs into a WordPress draft, the outputted code is a bit messed up.

For instance this

[code language="r"]
df1$key <- paste(df1$first_name, df1$last_name, sep="")
df2$key <- paste(df2$first_name, df2$last_name, sep="")
[/code]

is outputted like this

</p>
<p>df1$key <- paste(df1$first_name, df1$last_name, sep="")
df2$key <- paste(df2$first_name, df2$last_name, sep="")</p>
<p>

Syntax highlighting works though.

Maybe there exists a workaround I'm not aware of, or maybe this issue is related to some kind of bug in the add-on code?

Thank you!

o-simardcasanova-net commented 5 years ago

Precision: I use a WordPress.com blog.

georgeh commented 5 years ago

@simardcasanova Thanks for the report. That's interesting, because the add-on shouldn't be stripping shortcodes like [code]. Would you mind sharing a doc that has this behavior with george.hotelling@automattic.com so I can take a look?

o-simardcasanova-net commented 5 years ago

@georgeh I just sent you an email.