@knowcode/doc-builder 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/emoji-mapper.js +4 -4
- package/package.json +1 -1
package/lib/emoji-mapper.js
CHANGED
|
@@ -231,8 +231,8 @@ const emojiToPhosphor = {
|
|
|
231
231
|
* @returns {string} - HTML with emojis replaced by icons
|
|
232
232
|
*/
|
|
233
233
|
function replaceEmojisWithIcons(html, config = {}) {
|
|
234
|
-
// Check if feature is enabled
|
|
235
|
-
if (
|
|
234
|
+
// Check if feature is enabled - default to true if not explicitly set to false
|
|
235
|
+
if (config.features?.phosphorIcons === false) return html;
|
|
236
236
|
|
|
237
237
|
// First, protect code blocks and inline code from emoji replacement
|
|
238
238
|
const codeBlocks = [];
|
|
@@ -256,12 +256,12 @@ function replaceEmojisWithIcons(html, config = {}) {
|
|
|
256
256
|
);
|
|
257
257
|
|
|
258
258
|
// Get weight class if custom weight is specified
|
|
259
|
-
const weightClass = config.features
|
|
259
|
+
const weightClass = config.features?.phosphorWeight && config.features.phosphorWeight !== 'regular'
|
|
260
260
|
? `ph-${config.features.phosphorWeight}`
|
|
261
261
|
: 'ph';
|
|
262
262
|
|
|
263
263
|
// Apply size styling if configured
|
|
264
|
-
const sizeStyle = config.features
|
|
264
|
+
const sizeStyle = config.features?.phosphorSize
|
|
265
265
|
? ` style="font-size: ${config.features.phosphorSize}"`
|
|
266
266
|
: '';
|
|
267
267
|
|