You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0693ae6
Browse filesBrowse the repository at this point in the historyBrowse files
expect(result).toBe('This is *italic text* here.');
193
193
});
194
194
195
-
it('fixes spaces inside triple asterisks *** text *** -> ***text***',()=>{
196
-
constinput='This is *** bold italic *** text.';
197
-
const{ result }=fixEmphasisSpacing(input);
198
-
expect(result).toBe('This is ***bold italic*** text.');
195
+
it('preserves list item bullet with italic text and inter-word spaces',()=>{
196
+
constinput=[
197
+
'# Foundational Elements of the System View',
198
+
'',
199
+
'Wazlawick uses BPMN as the primary notation to map business reality prior to software requirements engineering:',
200
+
'',
201
+
'* **Pools and Lanes:** A *Pool* represents an autonomous business entity or external participant (e.g., an external enterprise, partner, or bank). A *Lane* partitions a single pool into internal roles, departments, or subsystem responsibilities.',
202
+
'* **Flow Types:**',
203
+
'* *Sequence Flows* model execution order and control strictly *within* a single pool.',
204
+
'* *Message Flows* (dashed lines with open circles/arrows) model asynchronous communication *between* independent pools. Sequence flows are forbidden from crossing pool boundaries.',
205
+
].join('\n');
206
+
207
+
const{ cleaned, stats }=cleanMarkdown(input);
208
+
expect(cleaned).toContain('* *Sequence Flows* model execution order and control strictly *within* a single pool.');
209
+
expect(cleaned).toContain('* *Message Flows* (dashed lines with open circles/arrows) model asynchronous communication *between* independent pools.');
210
+
expect(cleaned).toContain('* **Pools and Lanes:** A *Pool* represents an autonomous business entity');
211
+
expect(stats.emphasisFixed).toBe(0);
212
+
});
213
+
214
+
it('corrects malformed emphasis while preserving punctuation and delimiters',()=>{
215
+
constinput='"** bold in quotes **" and (* italic in parens *) and ** bold **, ** bold 2 **! ** bold 3 **?';
216
+
const{ result, count }=fixEmphasisSpacing(input);
217
+
expect(result).toBe('"**bold in quotes**" and (*italic in parens*) and **bold**, **bold 2**! **bold 3**?');
describe('Obsidian Previewer Parser & Math Rendering',()=>{
6
+
it('correctly renders inline math variables without corrupting them into $1 or $Is',()=>{
7
+
consttext='Glitch-Free Reactive Propagation: Fine-grained reactive graphs track dynamic dependencies at runtime, ensuring that if Signal $A$ updates both Signal $B$ and $C$, and $D$ depends on both, $D$ recalculates exactly once without intermediate stale reads ("glitches").';
8
+
consthtml=parseMarkdownToHtml(text);
9
+
10
+
// Verify it contains KaTeX math rendering for A, B, C, and D
11
+
expect(html).toContain('katex');
12
+
expect(html).toContain('A</annotation>');
13
+
expect(html).toContain('B</annotation>');
14
+
expect(html).toContain('C</annotation>');
15
+
expect(html).toContain('D</annotation>');
16
+
17
+
// Must NOT contain corrupted $1 or $Is
18
+
expect(html).not.toContain('$1');
19
+
expect(html).not.toContain('>1<');
20
+
expect(html).not.toContain('>$1<');
21
+
});
22
+
23
+
it('renders single character and formula inline math',()=>{
24
+
constsingle=renderInline('Formula $x$ and $y = mx + b$');
0 commit comments