diff --git a/sample_files/sample1.tsx b/sample_files/sample1.tsx
new file mode 100644
index 0000000..5a79915
--- /dev/null
+++ b/sample_files/sample1.tsx
@@ -0,0 +1,11 @@
+function Foo(props: { name: string }) {
+ return
{props.name}
+
+}
+
+export function Demo() {
+ return
+
+ Hello world!
+
+}
\ No newline at end of file
diff --git a/src/library/GithubPermalink/GithubPermalink.stories.tsx b/src/library/GithubPermalink/GithubPermalink.stories.tsx
index e2a07fe..095dfaa 100644
--- a/src/library/GithubPermalink/GithubPermalink.stories.tsx
+++ b/src/library/GithubPermalink/GithubPermalink.stories.tsx
@@ -23,6 +23,23 @@ export const Primary: Story = {
),
};
+export const DifferentLanguages: Story = {
+ render: () => (
+
Go
+
+
+
JavaScript
+
+
+
SQL
+
+
+
TSX
+
+
+ ),
+};
+
export const WithBackground: Story = {
render: () => (
diff --git a/src/library/GithubPermalink/GithubPermalinkBase.tsx b/src/library/GithubPermalink/GithubPermalinkBase.tsx
index 2529e0a..e88963f 100644
--- a/src/library/GithubPermalink/GithubPermalinkBase.tsx
+++ b/src/library/GithubPermalink/GithubPermalinkBase.tsx
@@ -41,11 +41,11 @@ export function GithubPermalinkBase(props: GithubPermalinkBaseProps) {
{formatedLineExclusions.map((v) => {
if (v.isExclude) {
- return
+ return
}
- return
+ return
})}
diff --git a/src/library/SyntaxHighlight/SyntaxHighlight.tsx b/src/library/SyntaxHighlight/SyntaxHighlight.tsx
index c2ebe3f..a7575b0 100644
--- a/src/library/SyntaxHighlight/SyntaxHighlight.tsx
+++ b/src/library/SyntaxHighlight/SyntaxHighlight.tsx
@@ -125,7 +125,8 @@ const noTheme = {
export function SyntaxHighlight(props: {
text: string;
startingLineNumber?: number;
- className?: string;
+ className?: string;
+ language?: string;
}) {
const { startingLineNumber, text, className } = props;
@@ -141,6 +142,6 @@ export function SyntaxHighlight(props: {
}, [])
- return {text}
+ return {text}
}