Skip to content

bug: diff code blocks used but not supported #4156

Open
perrygovier/ionic-docs
#10
@soundproofboot

Description

@soundproofboot

Describe the Bug

Code blocks with diff language syntax highlighting are used in several places in the docs but Docusaurus is not configured to support the diff language.

Expected Behavior

Code blocks using diff syntax highlighting show lines starting with + in green and lines starting with - in red.

Steps to Reproduce

This section in Angular build options includes several diff code blocks that show all text in grey currently.

Screenshots

Image

Operating System

No response

Browser

No response

Version

No response

Additional Information

This can be fixed by adding diff to the list of additionalLanguages in docusaurus.config.js line 327. Adding diff to the list will assign classes to inserted/deleted lines in diff blocks automatically.

The lines starting with + will be given the class inserted which is currently given the color #ff6810 in src/styles/components/_code.scss line 141. The .token.inserted class should probably be given a green color.

The lines starting with - will be given the class deleted which is currently correctly given the color red in src/styles/components/_code.scss line 178

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions