datacamp / datacamp/rdocumentation-2.0

Add syntax highlighting for R code?

Open
#14 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement in review
Dominant language
TypeScript
Stars
301
Forks
54
Avg merge
16h 19m
Merged PRs (30d)
1

Description

The easiest way to do this is probably via react-syntax-highlighter, but I couldn't find an existing theme that I felt matched the style of the rest of the site well enough: https://github.com/remarkjs/react-markdown#use-custom-renderers-syntax-highlight

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the react-syntax-highlighter suggestion and the react-markdown custom-renderers documentation linked in the issue. Determine how R code blocks are rendered and choose an approach that matches the site's existing style. Done means R code has syntax highlighting with an agreed visual theme.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, react, typescript
Domain
documentation, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.