Skip to content

Commit

Permalink
support java
Browse files Browse the repository at this point in the history
  • Loading branch information
JSerZANP committed Aug 13, 2023
1 parent 4917e07 commit f309d1d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
14 changes: 13 additions & 1 deletion examples/web/components/CodeSnippet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const ALL_LANGS = [
// "imba",
// "ini",
// "properties",
// "java",
"java",
"javascript",
// "jinja-html",
// "jison",
Expand Down Expand Up @@ -608,6 +608,18 @@ int main() {
// [Hello World!]
return 0;
}
`,
java: `
// @dim
public class CommentExample {
public static void main(String[] args) {
int x = 10;
// ----------
// ^
//[Hello world!]
int square = x * x;
}
}
`,
javascript: `// @dim
import { useState } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```java annotate
// @dim
public class CommentExample {
public static void main(String[] args) {
int x = 10;
// ----------
// ^
//[Hello world!]
int square = x * x;
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<pre class="shiki github-light" style="color:#24292e;background-color:#fff"><div class="code-container"><code><div class="line dim"><span style="color: #D73A49">public</span><span style="color: #24292E"> </span><span style="color: #D73A49">class</span><span style="color: #24292E"> </span><span style="color: #6F42C1">CommentExample</span><span style="color: #24292E"> {</span></div><div class="line"><span style="color: #24292E"> </span><span style="color: #D73A49">public</span><span style="color: #24292E"> </span><span style="color: #D73A49">static</span><span style="color: #24292E"> </span><span style="color: #D73A49">void</span><span style="color: #24292E"> </span><span style="color: #6F42C1">main</span><span style="color: #24292E">(</span><span style="color: #D73A49">String</span><span style="color: #24292E">[] </span><span style="color: #E36209">args</span><span style="color: #24292E">) {</span></div><div class="line"><span style="color: #24292E"> </span><span style="color: #D73A49">int</span><span style="color: #24292E"> x </span><span style="color: #D73A49">=</span><span style="color: #24292E"> </span><span style="color: #005CC5">10</span><span style="color: #24292E">;</span></div><div class="shaku-underline shaku-underline-solid" style="left:4ch"><span class="shaku-underline-line" style="left:0ch">----------</span></div><div class="shaku-callout" style="left:2ch"><span class="shaku-callout-arrow" style="left:7ch"></span><p>Hello world!</p></div><div class="line"><span style="color: #24292E"> </span><span style="color: #D73A49">int</span><span style="color: #24292E"> square </span><span style="color: #D73A49">=</span><span style="color: #24292E"> x </span><span style="color: #D73A49">*</span><span style="color: #24292E"> x;</span></div><div class="line"><span style="color: #24292E"> }</span></div><div class="line"><span style="color: #24292E">}</span></div></code></div></pre>

1 comment on commit f309d1d

@vercel
Copy link

@vercel vercel bot commented on f309d1d Aug 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

shaku-web – ./

shaku-web.vercel.app
shaku-web-git-main-jserzanp.vercel.app
shaku-web-jserzanp.vercel.app

Please sign in to comment.