-
Notifications
You must be signed in to change notification settings - Fork 50
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
Algoo ooxml #400
Algoo ooxml #400
Conversation
Defines constructor Defines the function for converting CiceroMark to OOXML Signed-off-by: k-kumar-01 <[email protected]>
Removes contructor Nodes declared as class variable Signed-off-by: k-kumar-01 <[email protected]>
Rules and helpers for the conversion Conversion of text and emphasize in CiceroMarktoOOXML and for emphasize in OOXML transformer Tests for the above Signed-off-by: k-kumar-01 <[email protected]>
@algomaster99 Also a thing I want to ask. After the previous commit(June-5) was merged, I did the following:
And also |
Yes. I also want to bring a few more things related to your attention.
I get that all of this may sound time-consuming and you already have a lot to code but you need to understand that reviewing is equally tough if not more. Better PR title and better description tell the reviewer about what they can expect from the code beforehand. Thus, making it easier for one to review and perhaps, add more suggestions which would be a good thing for you. |
@algomaster99 I will close this PR and create a new one from a newly created branch to algo-ooxml of upstream. |
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.
See comments for detailed review. Make a habit of running npx eslint . --fix
in markdown-docx
before committing. We could configure hooks for it but let it be due to time constraints.
describe('Round Tripping', () => { | ||
|
||
it('Pargaphs and emphasis', async () => { | ||
const ciceroMarkJSON = { |
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.
You can put this entire JSON object in the test resources directory.
const OoxmlTransformer = require('./OoxmlTransformer'); | ||
const CiceroMarkToOOXMLTransfomer = require('./CiceroMarkToOOXMLTransformer'); | ||
|
||
describe('Round Tripping', () => { |
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.
You should be descriptive here. Maybe something like "perform roundtripping between CiceroMark and OOXML ". I can give you a reason for this as well. When you run the entire test suite, and suppose this fails, you will have this name handy to know where it failed.
|
||
describe('Round Tripping', () => { | ||
|
||
it('Pargaphs and emphasis', async () => { |
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.
Reword this to should parse paragraphs and emphasis nodes
.
Also, there is a typographical error in "paragraphs". If you are prone to them, I suggest you to install a VSCode extension, or if your computer specification allows, switch to an IDE like WebStorm.
this.definedNodes = { | ||
computedVariable: 'org.accordproject.ciceromark.ComputedVariable', | ||
heading: 'org.accordproject.commonmark.Heading', | ||
item: 'org.accordproject.commonmark.Item', | ||
list: 'org.accordproject.commonmark.List', | ||
listBlock: 'org.accordproject.ciceromark.ListBlock', | ||
paragraph: 'org.accordproject.commonmark.Paragraph', | ||
softbreak: 'org.accordproject.commonmark.Softbreak', | ||
text: 'org.accordproject.commonmark.Text', | ||
variable: 'org.accordproject.ciceromark.Variable', | ||
emphasize: 'org.accordproject.commonmark.Emph', | ||
}; |
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.
Move this out of the class if eslint cannot parse this as a class variable.
* | ||
* @param {string} ooxml OOXML to be wrapped | ||
*/ | ||
wrapOOXML(ooxml){ |
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.
These are exactly the kind of methods that should be in helpers.
/utils
.
You don't need to always prefix issues with
You don't need to apologise. I am just telling you improvements on your PR and my intent is not to berate you. The monotonous nature of the text may say vice-versa but my sole purpose with such long texts is to help you understand and learn better. |
I just noticed you closed your PR. Anyway, do look at the reviews before submitting a new one. |
Changes
Author Checklist
--signoff
option of git commit.master
fromfork:branchname