Skip to content

Code syntax highlight does not work in codeblock #2403

@davidjennicson

Description

@davidjennicson

Describe the bug
The code syntax highlighting feature is not working. Neither auto-detect nor manually selecting a language (e.g., Python) applies syntax highlighting. This issue affects all languages, not just Python. It appears similar to issue #1492.

To Reproduce
Steps to reproduce the behavior:

  1. Create a Chapter (e.g., "Chapter 1") in an existing course

  2. Create a Lesson associated with this chapter (e.g., "Lesson 1")

  3. Click "Edit"

  4. Click the "+" button and select "CodeBox"

  5. Set language to "Auto-detect" or manually select "Python"

  6. Enter a simple code snippet, for example:

    def hello():
        print("Hello World")
  7. Observe that syntax highlighting is not applied

Expected behavior
Syntax highlighting should be applied automatically when "Auto-detect" is selected or when a specific language (e.g., Python) is chosen.

Screenshots

Image Image

Desktop (please complete the following information):

  • OS: Windows 11
  • Browser: Chrome

Smartphone (please complete the following information):
N/A

Additional context

  • Frappe version: 17.x.x-develop (e196232)
  • LMS version: 2.45.2 develop (41fb007)
  • Payments version: 0.0.1 develop (3cebd94)

This issue persists across all tested languages and is not limited to Python.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions