Merge pull request #809 from bokuweb/support-dstrike-reader

feat: Support dstrike reader
main
bokuweb 2025-03-11 13:16:57 +09:00 committed by GitHub
commit 31c109aacb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 3399 additions and 5 deletions

View File

@ -92,6 +92,13 @@ impl ElementReader for RunProperty {
}
rp = rp.strike();
}
XMLElement::Dstrike => {
if !read_bool(&attributes) {
rp.dstrike = Some(Dstrike::new().disable());
continue;
}
rp = rp.dstrike();
}
XMLElement::VertAlign => {
if let Ok(v) = VertAlignType::from_str(&attributes[0].value) {
rp = rp.vert_align(v)

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"name": "docx-wasm",
"version": "0.4.18-rc41",
"version": "0.4.18-rc42",
"main": "dist/node/index.js",
"browser": "dist/web/index.js",
"author": "bokuweb <bokuweb12@gmail.com>",

File diff suppressed because it is too large Load Diff

View File

@ -220,6 +220,12 @@ describe("reader", () => {
const json = w.readDocx(buffer);
expect(json).toMatchSnapshot();
});
test("should read dstrike", () => {
const buffer = readFileSync("../fixtures/dstrike/dstrike.docx");
const json = w.readDocx(buffer);
expect(json).toMatchSnapshot();
});
});
describe("writer", () => {

Binary file not shown.