@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.
@@ -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 (!config.features?.phosphorIcons) return html;
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.phosphorWeight && config.features.phosphorWeight !== 'regular'
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.phosphorSize
264
+ const sizeStyle = config.features?.phosphorSize
265
265
  ? ` style="font-size: ${config.features.phosphorSize}"`
266
266
  : '';
267
267
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowcode/doc-builder",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Reusable documentation builder for markdown-based sites with Vercel deployment support",
5
5
  "main": "index.js",
6
6
  "bin": {