@arsedizioni/ars-utils 20.0.37 → 20.0.40
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/clipper.ui/index.d.ts +1 -1
- package/core/index.d.ts +2 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +7 -2
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +4 -4
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/package.json +5 -5
package/clipper.ui/index.d.ts
CHANGED
|
@@ -1031,7 +1031,7 @@ declare class ClipperDocumentMenuComponent implements OnInit, OnDestroy {
|
|
|
1031
1031
|
private changeDetector;
|
|
1032
1032
|
private clipperService;
|
|
1033
1033
|
readonly useSelections: _angular_core.InputSignal<boolean>;
|
|
1034
|
-
readonly selectionSource: _angular_core.InputSignal<"selection" | "
|
|
1034
|
+
readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
|
|
1035
1035
|
protected selection: () => ClipperDocumentInfo[];
|
|
1036
1036
|
readonly parent: _angular_core.InputSignal<ClipperSearchResultManager>;
|
|
1037
1037
|
readonly item: _angular_core.InputSignal<ClipperDocumentInfo>;
|
package/core/index.d.ts
CHANGED
|
@@ -205,9 +205,10 @@ declare class SystemUtils {
|
|
|
205
205
|
/**
|
|
206
206
|
* Convert markdown to html
|
|
207
207
|
* @param markdown : the markdown data
|
|
208
|
+
* @param escapeEntities : true to escape entities. Default is false
|
|
208
209
|
* @returns the html
|
|
209
210
|
*/
|
|
210
|
-
static markdownToHtml(markdown: string): string;
|
|
211
|
+
static markdownToHtml(markdown: string, escapeEntities?: boolean): string;
|
|
211
212
|
/**
|
|
212
213
|
* Convert markdown table to html
|
|
213
214
|
* @param markdown: the markdown string
|
|
@@ -323,12 +323,15 @@ class SystemUtils {
|
|
|
323
323
|
/**
|
|
324
324
|
* Convert markdown to html
|
|
325
325
|
* @param markdown : the markdown data
|
|
326
|
+
* @param escapeEntities : true to escape entities. Default is false
|
|
326
327
|
* @returns the html
|
|
327
328
|
*/
|
|
328
|
-
static markdownToHtml(markdown) {
|
|
329
|
+
static markdownToHtml(markdown, escapeEntities = false) {
|
|
329
330
|
let html = markdown;
|
|
330
331
|
//1. Escape HTML entities
|
|
331
|
-
|
|
332
|
+
if (escapeEntities == true) {
|
|
333
|
+
html = html.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
|
334
|
+
}
|
|
332
335
|
// 2. Code blocks
|
|
333
336
|
html = html.replace(/```(\w+)?\n([\s\S]*?)```/g, (_match, lang, code) => {
|
|
334
337
|
const langClass = lang ? ` class="language-${lang}"` : '';
|
|
@@ -369,6 +372,8 @@ class SystemUtils {
|
|
|
369
372
|
// 14. Paragrafi (ultimo step per non interferire con altri elementi)
|
|
370
373
|
html = this.markdownConvertParagraphs(html);
|
|
371
374
|
// 15. Clean up extra newlines
|
|
375
|
+
html = html.replace(/\`\`\`markdown/g, '');
|
|
376
|
+
html = html.replace(/\*\*/g, '');
|
|
372
377
|
html = html.replace(/\n{3,}/g, '\n\n');
|
|
373
378
|
return html.trim();
|
|
374
379
|
}
|