Skip to content

Commit

Permalink
Merge pull request #7188 from pretendWhale/v2.5.1
Browse files Browse the repository at this point in the history
V2.5.1
  • Loading branch information
david-yz-liu authored Aug 27, 2024
2 parents 072faf1 + a3e2701 commit dc710a4
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 10 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [v2.5.1]

### 🐛 Bug fixes

- Fix bug in syntax highlighting caused by incorrect function call (#7187)

## [v2.5.0]

### ✨ New features and improvements
Expand Down
10 changes: 5 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ GEM
combine_pdf (1.0.26)
matrix
ruby-rc4 (>= 0.1.5)
concurrent-ruby (1.3.3)
concurrent-ruby (1.3.4)
config (5.5.1)
deep_merge (~> 1.2, >= 1.2.1)
connection_pool (2.4.1)
Expand Down Expand Up @@ -183,7 +183,7 @@ GEM
dry-schema (>= 1.12, < 2)
zeitwerk (~> 2.6)
erubi (1.13.0)
et-orbi (1.2.7)
et-orbi (1.2.11)
tzinfo
exception_notification (4.5.0)
actionmailer (>= 5.2, < 8)
Expand All @@ -197,8 +197,8 @@ GEM
faker (3.4.2)
i18n (>= 1.8.11, < 2)
ffi (1.16.3)
fugit (1.9.0)
et-orbi (~> 1, >= 1.2.7)
fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4)
fuubar (2.5.1)
rspec-core (~> 3.0)
Expand Down Expand Up @@ -380,7 +380,7 @@ GEM
redis (>= 3.3)
resque (>= 1.27)
rufus-scheduler (~> 3.2, != 3.3)
rexml (3.3.4)
rexml (3.3.6)
strscan
rmagick (6.0.1)
observer (~> 0.1)
Expand Down
2 changes: 1 addition & 1 deletion app/MARKUS_VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
VERSION=v2.5.0,PATCH_LEVEL=DEV
VERSION=v2.5.1,PATCH_LEVEL=DEV
2 changes: 1 addition & 1 deletion app/assets/javascripts/Components/Result/text_viewer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export class TextViewer extends React.PureComponent {
}
}
if (currLine.textContent.length > 0) {
nodeLines.appendChild(currLine);
nodeLines.push(currLine);
}
nodeLines.push(this.raw_content.current.lastChild.cloneNode(true));
while (this.raw_content.current.firstChild) {
Expand Down
17 changes: 14 additions & 3 deletions app/assets/javascripts/Components/__tests__/text_viewer.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import {TextViewer} from "../Result/text_viewer";
describe("TextViewer", () => {
let props;

beforeEach(() => {
afterEach(cleanup);

it("should render its text content when the content ends with a new line", () => {
props = {
content: "def f(n: int) -> int:\n return n + 1\n",
annotations: [],
Expand All @@ -14,11 +16,20 @@ describe("TextViewer", () => {
};

render(<TextViewer {...props} />);

expect(screen.getByText("def f(n: int) -> int:")).toBeInTheDocument();
});

afterEach(cleanup);
it("should render its text content when the content doesn't end with a new line", () => {
props = {
content: "def f(n: int) -> int:\n return n + 1",
annotations: [],
focusLine: null,
submission_file_id: 1,
};

render(<TextViewer {...props} />);

it("should render its text content", () => {
expect(screen.getByText("def f(n: int) -> int:")).toBeInTheDocument();
});
});

0 comments on commit dc710a4

Please sign in to comment.