-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add heading transformer - #397 #404
Conversation
Heading transformer for CiceroMark->OOXML Roundtrip(CiceroMark <-> OOXML) test for above Signed-off-by: k-kumar-01 <[email protected]>
@algomaster99 PS: I will replace |
let textandHeadingCiceroMark = await fs.readFileSync( | ||
'test/data/ciceroMark/text-and-heading.json', | ||
'utf-8' | ||
); | ||
// converts from string to JSON object | ||
textandHeadingCiceroMark = JSON.parse(textandHeadingCiceroMark); | ||
|
||
const ciceroMarkTransformer = new CiceroMarkToOOXMLTransfomer(); | ||
const ooxml = ciceroMarkTransformer.toOOXML(textandHeadingCiceroMark); | ||
|
||
const ooxmlTransformer = new OoxmlTransformer(); | ||
const convertedObject = ooxmlTransformer.toCiceroMark(ooxml); | ||
expect(convertedObject).to.deep.equal(textandHeadingCiceroMark); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is similar to what you did for text and paragraph test. I think this can be reused but not in this PR. You can refactor this in a separate PR but do create an issue to keep track of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
Sure. Keep this on priority. |
Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 <[email protected]>
Signed-off-by: k-kumar-01 [email protected]
Partial improvement #397
Changes
Author Checklist
--signoff
option of git commit.master
fromfork:branchname