Provide a runnable local Beta and fix multi-page SVG previews
This commit is contained in:
1 parent
fb557c09c6
commit
9841e88900
7 files changed
+324
-9
No files matched your search
@@ -6,11 +6,31 @@ use texrra_tex_core::math::{MathAtom, parse_math};
|
||||
use texrra_tex_core::math_font::MathFontId;
|
||||
use texrra_tex_core::paragraph::{HorizontalItem, InlineSegment, ParagraphFont, ParagraphStyle};
|
||||
use texrra_tex_core::pdf::{PageOrigin, display_lists_to_pdf_with_cm_type1};
|
||||
use texrra_tex_core::render::DisplayItem;
|
||||
use texrra_tex_core::render::{DisplayItem, DisplayList};
|
||||
use texrra_tex_core::{Document, Engine, Unit, VerticalItem};
|
||||
|
||||
const PT: i64 = 65_536;
|
||||
|
||||
#[test]
|
||||
fn svg_glyph_labels_escape_attribute_quotes() {
|
||||
let display = DisplayList {
|
||||
width: 12 * PT,
|
||||
height: 12 * PT,
|
||||
items: vec![DisplayItem::MathGlyph {
|
||||
x: 0,
|
||||
y: 6 * PT,
|
||||
size: 10 * PT,
|
||||
character: '"',
|
||||
face: MathFontId(0),
|
||||
slot: b'"',
|
||||
}],
|
||||
..DisplayList::default()
|
||||
};
|
||||
let svg = display.try_to_svg().unwrap();
|
||||
assert!(svg.contains(r#"aria-label="""><use"#));
|
||||
assert!(svg.contains(r#"aria-hidden="true">"</text>"#));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn structural_display_edits_replay_the_preceding_paragraph_dependency() {
|
||||
let style = ParagraphStyle {
|
||||
|
||||
Reference in new issue
Block a user