c063 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@ import { CodeLine } from "./CodeLine";
12
12
  * @returns JSX 元素,呈現語法高亮的程式碼區塊
13
13
  */
14
14
  export const CodeBlock = ({ tokenLines, showLineNumbers = true, lineNumberStyle, autoWrap, theme, ...rest }) => {
15
- return (_jsx("pre", { ...rest, style: { margin: 0, padding: 0, overflowX: "auto" }, children: _jsx("table", { style: { borderCollapse: "collapse", width: "100%" }, children: _jsx("tbody", { children: tokenLines.map((line, index) => (_jsxs("tr", { children: [showLineNumbers && (_jsx("td", { style: {
15
+ return (_jsx("pre", { ...rest, style: { margin: 0, padding: 0, overflowX: "auto" }, children: _jsx("table", { style: { borderCollapse: "collapse", width: "100%" }, children: _jsx("tbody", { children: tokenLines.map((line, index) => (_jsxs("tr", { style: { verticalAlign: "top" }, children: [showLineNumbers && (_jsx("td", { style: {
16
16
  paddingInline: "0.5rem",
17
17
  textAlign: "right",
18
18
  whiteSpace: "pre",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
3
  "name": "c063",
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "description": "A React component for displaying code snippets with syntax highlighting.",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@ export const CodeBlock = <T extends React.ElementType = "span">({
25
25
  <table style={{ borderCollapse: "collapse", width: "100%" }}>
26
26
  <tbody>
27
27
  {tokenLines.map((line, index) => (
28
- <tr key={index}>
28
+ <tr key={index} style={{ verticalAlign: "top" }}>
29
29
  {showLineNumbers && (
30
30
  <td
31
31
  style={{