@sveltia/ui 0.28.2 → 0.28.3

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.
@@ -220,9 +220,14 @@ const onEditorUpdate = (editor) => {
220
220
  value: convertToMarkdownString(
221
221
  // Use underscores for italic text in Markdown instead of asterisks
222
222
  allTransformers.filter((/** @type {any} */ { tag }) => tag !== '*'),
223
- ) // Remove unnecessary backslashes for underscores
223
+ ) // Remove unnecessary backslash for underscore and backslash characters
224
224
  // @see https://github.com/sveltia/sveltia-cms/issues/430
225
- .replace(/\\_/g, '_'),
225
+ // @see https://github.com/sveltia/sveltia-cms/issues/512
226
+ .replace(/\\([_\\])/g, '$1')
227
+ // Replace non-breaking space before markdown syntax characters with regular space.
228
+ // This can happen when bold or italic text ends with a space
229
+ // @see https://github.com/sveltia/sveltia-cms/issues/511
230
+ .replace(/ ([*_]+)/g, '$1 '),
226
231
  selection: getSelectionTypes(),
227
232
  },
228
233
  }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sveltia/ui",
3
- "version": "0.28.2",
3
+ "version": "0.28.3",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {