Skip to content

feat(markdown-docx): add API to return frequency of variables in CiceroMark (JSON) - #397#411

Merged
algomaster99 merged 2 commits intoalgoo-ooxmlfrom
k-kumar-01/i397/return-counter-CiceromarkToOOXMLTransformer
Jun 17, 2021
Merged

feat(markdown-docx): add API to return frequency of variables in CiceroMark (JSON) - #397#411
algomaster99 merged 2 commits intoalgoo-ooxmlfrom
k-kumar-01/i397/return-counter-CiceromarkToOOXMLTransformer

Conversation

@K-Kumar-01
Copy link
Copy Markdown
Collaborator

@K-Kumar-01 K-Kumar-01 commented Jun 17, 2021

Return counter for variables in CiceroMark

Signed-off-by: k-kumar-01 kushalkumargupta4@gmail.com

Enhancement to the CiceroMarkToOOXMLTransformer by returning the counter for variables in CiceroMark of a template.

Changes

  • Use a class variable counter to store the counter.
  • A function getCounter() that returns the counter.

Related Issues

Author Checklist

  • Ensure you provide a DCO sign-off for your commits using the --signoff option of git commit.
  • Vital features and changes captured in unit and/or integration tests
  • Commits messages follow AP format
  • Extend the documentation, if necessary
  • Merging to master from fork:branchname

Return counter for variables in CiceroMark

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
@K-Kumar-01 K-Kumar-01 requested a review from algomaster99 June 17, 2021 12:18
Copy link
Copy Markdown
Contributor

@algomaster99 algomaster99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See changes.

}

/**
* Returns the counter holding variable counts for a CiceroMark.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"count" (singular)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CiceroMark (JSON)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@algomaster99
Updated

this.getNodes(node, counter);
});
this.globalOOXML = wrapAroundDefaultDocxTags(this.globalOOXML);
this.counter = counter;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since counter is an instance variable now, you don't need to maintain a separate counter. Use this.counter wherever required.

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
@K-Kumar-01 K-Kumar-01 requested a review from algomaster99 June 17, 2021 14:53
Copy link
Copy Markdown
Contributor

@algomaster99 algomaster99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🎉

Not sure if you noticed but ooxml = '' is also not needed in toOOXML. Maybe you can change it similarly in separate PR.

@algomaster99 algomaster99 changed the title feat(markdown-docx): counter for variables - #397 feat(markdown-docx): add API to return frequency of variables in CiceroMark (JSON) - #397 Jun 17, 2021
@algomaster99 algomaster99 merged commit a170dec into algoo-ooxml Jun 17, 2021
@algomaster99 algomaster99 deleted the k-kumar-01/i397/return-counter-CiceromarkToOOXMLTransformer branch June 17, 2021 15:52
algomaster99 pushed a commit that referenced this pull request Jun 17, 2021
…roMark (JSON) - #397 (#411)

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
algomaster99 pushed a commit that referenced this pull request Jun 17, 2021
…roMark (JSON) - #397 (#411)

Signed-off-by: k-kumar-01 <kushalkumargupta4@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants