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

JAVA comments have no color #3848

Open
brucelpt opened this issue Dec 6, 2024 · 0 comments
Open

JAVA comments have no color #3848

brucelpt opened this issue Dec 6, 2024 · 0 comments

Comments

@brucelpt
Copy link

brucelpt commented Dec 6, 2024

Information:

  • Prism version: 1.29.0
  • Plugins: <script src="//cdn.jsdelivr.net/npm/prismjs@1/plugins/autoloader/prism-autoloader.min.js"></script>
  • Environment: docsify latest

Description
I'm using prism 1.29.0 with docsify. My index.html is as follows:

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="viewport" content="width=device-width,initial-scale=1" />
  <meta charset="UTF-8" />
  <link
    rel="stylesheet"
    href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css"
  />

  <link href="//cdn.jsdelivr.net/npm/prismjs@1/themes/prism-dark.css" rel="stylesheet">
</head>
<body>
  <div id="app">Loading...</div>
  <script>
    window.$docsify = {
      name: 'Ieco-Common',
      coverpage: true,
      onlyCover: true,
      loadNavbar: true,
      mergeNavbar: true,
      maxLevel: 2,
      theme: 'dark',
      search: "auto"
    }
  </script>
  <!-- Docsify v4 -->
  <script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
  <script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.js"></script>
  <!-- <script src="https://cdn.bootcss.com/docsify/4.5.9/plugins/search.min.js"></script> -->
  <script src="//cdn.jsdelivr.net/npm/prismjs@1/prism.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/prismjs@1/plugins/autoloader/prism-autoloader.min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-xml-doc.js"></script>
  <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-java.js"></script>

  <script src="//cdn.jsdelivr.net/npm/prismjs@1/components/prism-yaml.js"></script>
  <script src="//unpkg.com/[email protected]/dist/docsify-copy-code.min.js"></script>
</body>
</html>

My code content in markdown format:

/**
* Business log interface modification example
* The difference between @BusinessLog and @AutoLog is that @BusinessLog will determine if the interface name contains the characters "modify", "edit", or "state switch", and will
* start the data comparison function to compare the modification points of the user's new and old data and record them in the database. Before modifying, you need to use the LogObjectHolder.me().set()
* method to save the database data entity before modification.
* @param json
* @return
* @throws Exception
*/
@BusinessLog(value = "Modify test interface", key = "departId")
@PostMapping("/businessLogDemo")
public BaseResult businessLogDemo(JSONObject json)throws Exception

But the actual effect is as follows:
image

I thought the comments would be olive green like Idea, or dark like git code highlighting.

But there is basically no color rendering of the code in the rendering.

Did I do something wrong?

Example
I wrote a simple example, you can check my git repository。
For specific environment and startup steps, please refer to readme.md in the repository
https://github.com/brucelpt/docsify-prism-demo.git

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

No branches or pull requests

1 participant