mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-10-09 03:17:58 +00:00
Merge a97a8b6713 into c3cae397a1
This commit is contained in:
commit
3828d5c276
2 changed files with 23 additions and 5 deletions
|
|
@ -166,11 +166,8 @@ const StyledMarkdown = styled.div`
|
||||||
/* Table styles for remark-gfm */
|
/* Table styles for remark-gfm */
|
||||||
table {
|
table {
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin: 1em 0;
|
|
||||||
width: auto;
|
width: auto;
|
||||||
min-width: 50%;
|
min-width: 50%;
|
||||||
max-width: 100%;
|
|
||||||
table-layout: fixed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Table wrapper for horizontal scrolling */
|
/* Table wrapper for horizontal scrolling */
|
||||||
|
|
@ -184,8 +181,7 @@ const StyledMarkdown = styled.div`
|
||||||
border: 1px solid var(--vscode-panel-border);
|
border: 1px solid var(--vscode-panel-border);
|
||||||
padding: 8px 12px;
|
padding: 8px 12px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
word-wrap: break-word;
|
white-space: nowrap;
|
||||||
overflow-wrap: break-word;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
th {
|
th {
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,28 @@ describe("MarkdownBlock", () => {
|
||||||
expect(screen.getByText("Step three")).toBeInTheDocument()
|
expect(screen.getByText("Step three")).toBeInTheDocument()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it("should render tables inside a scrollable wrapper", async () => {
|
||||||
|
const markdown = `| Column A | Column B | Column C |
|
||||||
|
| --- | --- | --- |
|
||||||
|
| Data 1 | Data 2 | Data 3 |`
|
||||||
|
|
||||||
|
const { container } = render(<MarkdownBlock markdown={markdown} />)
|
||||||
|
|
||||||
|
await screen.findByText("Column A")
|
||||||
|
|
||||||
|
// Table should be wrapped in a .table-wrapper div for horizontal scrolling
|
||||||
|
const wrapper = container.querySelector(".table-wrapper")
|
||||||
|
expect(wrapper).toBeInTheDocument()
|
||||||
|
|
||||||
|
const table = wrapper?.querySelector("table")
|
||||||
|
expect(table).toBeInTheDocument()
|
||||||
|
|
||||||
|
// Verify table content renders correctly
|
||||||
|
expect(screen.getByText("Column B")).toBeInTheDocument()
|
||||||
|
expect(screen.getByText("Data 1")).toBeInTheDocument()
|
||||||
|
expect(screen.getByText("Data 3")).toBeInTheDocument()
|
||||||
|
})
|
||||||
|
|
||||||
it("should render nested lists with proper hierarchy", async () => {
|
it("should render nested lists with proper hierarchy", async () => {
|
||||||
const markdown = `Complex list:
|
const markdown = `Complex list:
|
||||||
1. First level ordered
|
1. First level ordered
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue