Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala prism bug #1830

Closed
1 task done
hagay3 opened this issue Jul 2, 2022 · 1 comment
Closed
1 task done

Scala prism bug #1830

hagay3 opened this issue Jul 2, 2022 · 1 comment
Labels

Comments

@hagay3
Copy link

hagay3 commented Jul 2, 2022

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.

@sy-records
Copy link
Member

usage:

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

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants