Skip to content

Scala prism bug #1830

Closed
Closed
@hagay3

Description

@hagay3

Bug Report

Steps to reproduce

Add scala prism to index.html

<script src="//cdn.jsdelivr.net/npm/[email protected]/components/prism-scala.min.js"></script>

Add to readme the following scala code

import skuber._
import skuber.json.format._
val k8s = k8sInit
val patchStr="""{ "spec": { "replicas" : 1 } }"""
val stsFut = k8s.jsonMergePatch(myStatefulSet, patchStr)

What is the current behaviour

  1. Errors in chrome console
docsify@4:1 Uncaught TypeError: Cannot set properties of undefined (setting 'triple-quoted-string')
    at Object.extend (docsify@4:1:69345)
    at prism-scala.min.js:1:39
extend @ docsify@4:1
(anonymous) @ prism-scala.min.js:1
  1. No syntax highlighting for scala

What is the expected behaviour

Syntax highlighting

Other relevant information

  • Bug does still occur when all/other plugins are disabled?

  • Your OS: Mac

  • Node.js version: v14.17.2

  • npm/yarn version: 6.14.13

  • Browser version: Chrome, Version 103.0.5060.53 (Official Build) (x86_64)

  • Docsify version: 4.4.4

  • Docsify plugins: prism scala

Please create a reproducible sandbox

Edit 307qqv236

It looks like here prism offers how to solve the issue
PrismJS/prism#3458

In case adding both java & scala prism scripts, it solves the issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions