nytimes / library

A collaborative documentation site, powered by Google Docs.
https://nyt-library-demo.herokuapp.com/
Apache License 2.0
1.15k stars 144 forks source link

Native code blocks #377

Open RohanM opened 3 months ago

RohanM commented 3 months ago

Description of Change

Adds formatting support for google docs native code blocks.

Related Issue

N/A

Motivation and Context

Google docs has a native code block (inserted with Insert -> Building blocks -> Code block or typing @code in the document body). In the document HTML, the start and end of these blocks are marked by unicode characters EC03 and EC02. Although docs has the provision to set the language of the block, I wasn't able to find this in the document HTML.

Checklist