Compare commits

...
Author SHA1 Message Date
alam00000 f638f8e4db Release v2.8.11 2026-10-31 16:50:27 +05:30
Alam 24b060a134 Merge pull request #919 from kelseyjmw/fix-crop-scroll
Fix crop scroll
2026-10-31 16:38:58 +05:30
alam00000 6dca41aeb4 revert ICLA.md changes 2026-10-31 16:26:50 +05:30
alam00000 2a8ce12b6e add support for GFM inline math delimiters 2026-10-31 16:16:23 +05:30
Alam d03594a09d Merge pull request #964 from alam00000/chore/update-pdf-engine
build(deps): bump PDF engine and viewer to 3f6b6114b166
2026-10-31 16:03:14 +05:30
Kelsey White a25c6511ce Signed ICLA.md 2026-10-16 13:19:17 -03:00
Kelsey White 6d8ef7d694 Fix for issue 903: Crop tool now moves page focus to top after use 2026-10-16 13:09:32 -03:00
6 changed files with 33 additions and 5 deletions
+2 -2
View File
@@ -7,10 +7,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.9
version: 1.0.10
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: '2.8.10'
appVersion: '2.8.11'
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "bento-pdf",
"private": true,
"version": "2.8.10",
"version": "2.8.11",
"license": "AGPL-3.0-only",
"type": "module",
"scripts": {
+3 -1
View File
@@ -424,7 +424,7 @@ async function performFlatteningCrop(
return newPdfDoc.save();
}
function resetState() {
export function resetState() {
if (cropperState.cropper) {
cropperState.cropper.destroy();
cropperState.cropper = null;
@@ -447,4 +447,6 @@ function resetState() {
const cropBtn = document.getElementById('crop-button') as HTMLButtonElement;
if (cropBtn) cropBtn.disabled = true;
window.scrollTo({ top: 0, behavior: 'smooth' });
}
+1
View File
@@ -84,6 +84,7 @@ const ESCAPED_MATH: ReadonlyArray<[string, string, boolean]> = [
['\\\\[', '\\\\]', true],
['\\\\(', '\\\\)', false],
['\\[', '\\]', true],
['$`', '`$', false],
];
function escapedMath(state: StateInline, silent: boolean): boolean {
+18
View File
@@ -0,0 +1,18 @@
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { resetState } from '../js/logic/crop-pdf-page.ts';
// Test resetState function for cropping
describe('resetState', () => {
beforeEach(() => {
vi.spyOn(window, 'scrollTo').mockImplementation(() => {});
});
it('scrolls the page to the top after resetting', () => {
resetState();
expect(window.scrollTo).toHaveBeenCalledWith({
top: 0,
behavior: 'smooth',
});
});
});
+8 -1
View File
@@ -58,10 +58,17 @@ describe('Markdown to PDF rendering', () => {
'',
'```math\n\\int x\n```',
'',
'GitHub $`\\sqrt{3}`$ inline.',
'',
'Price $5 and $10, escaped \\$3, code `$q$`.',
].join('\n')
);
expect(root.querySelectorAll('.katex').length).toBe(8);
expect(root.querySelectorAll('.katex').length).toBe(9);
const github = [...root.querySelectorAll('p')].find((p) =>
p.textContent?.startsWith('GitHub')
);
expect(github?.querySelector('.katex')).not.toBeNull();
expect(github?.textContent).not.toMatch(/[$`‘’]/);
expect(root.querySelectorAll('.katex-display').length).toBe(5);
expect(root.querySelector('em')).toBeNull();
expect(root.textContent).toContain('Price $5 and $10, escaped $3');