Skip to content

Commit

Permalink
feat: add text and emphasis transformers - accordproject#397
Browse files Browse the repository at this point in the history
Documentation update

Signed-off-by: k-kumar-01 <[email protected]>
  • Loading branch information
K-Kumar-01 committed Jun 11, 2021
1 parent e43b15a commit f875a96
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/markdown-docx/src/CiceroMarkToOOXMLRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ const { sanitizeHtmlChars } = require('./CiceroMarkToOOXMLHelpers');
/**
* Inserts text.
*
* @param {string} value Text to be rendered
* @returns {string} OOXML for the text
* @param {string} value Enclosing value of the OOXML tag
* @returns {string} OOXML tag for the text
*/
const TEXT_RULE = (value) => {
return `<w:r><w:t xml:space="preserve">${sanitizeHtmlChars(value)}</w:t></w:r>`;
};

/**
* Inserts emphsaised text.
* Inserts emphasised text.
*
* @param {string} value Text to be rendered
* @returns {string} OOXML for the emphasised text
* @param {string} value Enclosing value of the OOXML tag
* @returns {string} OOXML tag for the emphasised text
*/
const EMPHASIS_RULE = (value) => {
return `<w:r><w:rPr><w:i w:val="true" /></w:rPr><w:t>${sanitizeHtmlChars(value)}</w:t></w:r>`;
Expand Down

0 comments on commit f875a96

Please sign in to comment.