@humanspeak/svelte-markdown 0.7.8 → 0.7.10

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/README.md CHANGED
@@ -318,11 +318,11 @@ This is a **markdown** paragraph with <em>HTML emphasis</em> mixed in.
318
318
  Tables support both Markdown and HTML formatting in cells:
319
319
 
320
320
  ```markdown
321
- | Feature | Markdown | HTML |
322
- |---------|:--------:|-----:|
323
- | Bold | **text** | <strong>text</strong> |
324
- | Italic | *text* | <em>text</em> |
325
- | Links | [text](url) | <a href="url">text</a> |
321
+ | Feature | Markdown | HTML |
322
+ | ------- | :---------: | ---------------------: |
323
+ | Bold | **text** | <strong>text</strong> |
324
+ | Italic | _text_ | <em>text</em> |
325
+ | Links | [text](url) | <a href="url">text</a> |
326
326
  ```
327
327
 
328
328
  ### Interactive HTML Elements
@@ -335,7 +335,7 @@ HTML interactive elements like `<details>` work seamlessly:
335
335
 
336
336
  - This is a markdown list
337
337
  - Inside an HTML details element
338
- - Supporting **bold** and *italic* text
338
+ - Supporting **bold** and _italic_ text
339
339
 
340
340
  </details>
341
341
  ```
@@ -348,9 +348,9 @@ HTML block elements can contain Markdown content:
348
348
  <blockquote>
349
349
  ### Markdown Heading in Blockquote
350
350
 
351
- - List item with **bold**
352
- - Another item with *italic*
353
- </blockquote>
351
+ - List item with **bold**
352
+ - Another item with _italic_
353
+ </blockquote>
354
354
  ```
355
355
 
356
356
  ### Component Customization
@@ -399,12 +399,12 @@ The current extenral dependencies are:
399
399
 
400
400
  - [Marked](https://marked.js.org/)
401
401
  - [Github-Slugger](https://github.com/Flet/github-slugger)
402
- - [HTMLParser2](https://github.com/fb55/htmlparser2).
402
+ - [HTMLParser2](https://github.com/fb55/htmlparser2)
403
403
 
404
404
  ## Related
405
405
 
406
- - [ReactMarkdown](https://github.com/remarkjs/react-markdown) - React library to render markdown using React components. Inspiration for this library.
407
- - [Svelte](https://svelte.dev) - JavaScript front-end framework.
406
+ - [ReactMarkdown](https://github.com/remarkjs/react-markdown) - React library to render markdown using React components. Inspiration for this library
407
+ - [Svelte](https://svelte.dev) - JavaScript front-end framework
408
408
  - [Original](https://github.com/pablo-abc/svelte-markdown) - Original component
409
409
 
410
410
  Made with ♥ by [Humanspeak](https://humanspeak.com)
@@ -72,12 +72,10 @@
72
72
 
73
73
  const combinedOptions = { ...defaultOptions, ...options }
74
74
  const slugger = source ? new Slugger() : undefined
75
- let lexer: Lexer
76
75
 
77
76
  const tokens = $derived.by(() => {
78
- if (!lexer) {
79
- lexer = new Lexer(combinedOptions)
80
- }
77
+ const lexer = new Lexer(combinedOptions)
78
+
81
79
  if (Array.isArray(source)) {
82
80
  return source as Token[]
83
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humanspeak/svelte-markdown",
3
- "version": "0.7.8",
3
+ "version": "0.7.10",
4
4
  "description": "A powerful, customizable markdown renderer for Svelte with TypeScript support",
5
5
  "type": "module",
6
6
  "svelte": "./dist/index.js",
@@ -32,12 +32,16 @@
32
32
  "test:watch": "vitest",
33
33
  "lint": "prettier --check . && eslint .",
34
34
  "lint:fix": "npm run format && eslint . --fix",
35
- "format": "prettier --write ."
35
+ "format": "prettier --write .",
36
+ "test:e2e": "playwright test",
37
+ "test:e2e:ui": "playwright test --ui",
38
+ "test:e2e:debug": "playwright test --debug",
39
+ "test:e2e:report": "playwright show-report"
36
40
  },
37
41
  "dependencies": {
38
42
  "github-slugger": "^2.0.0",
39
43
  "htmlparser2": "^10.0.0",
40
- "marked": "^15.0.5"
44
+ "marked": "^15.0.6"
41
45
  },
42
46
  "peerDependencies": {
43
47
  "svelte": "^5.0.0"
@@ -45,16 +49,17 @@
45
49
  "devDependencies": {
46
50
  "@eslint/eslintrc": "^3.2.0",
47
51
  "@eslint/js": "^9.17.0",
52
+ "@playwright/test": "^1.49.1",
48
53
  "@sveltejs/adapter-auto": "^3.3.1",
49
- "@sveltejs/kit": "^2.15.1",
54
+ "@sveltejs/kit": "^2.15.2",
50
55
  "@sveltejs/package": "^2.3.7",
51
56
  "@sveltejs/vite-plugin-svelte": "^5.0.3",
52
57
  "@testing-library/jest-dom": "^6.6.3",
53
58
  "@testing-library/svelte": "^5.2.6",
54
59
  "@testing-library/user-event": "^14.5.2",
55
60
  "@types/node": "^22.10.5",
56
- "@typescript-eslint/eslint-plugin": "^8.19.0",
57
- "@typescript-eslint/parser": "^8.19.0",
61
+ "@typescript-eslint/eslint-plugin": "^8.19.1",
62
+ "@typescript-eslint/parser": "^8.19.1",
58
63
  "@vitest/coverage-v8": "^3.0.0-beta.3",
59
64
  "eslint": "^9.17.0",
60
65
  "eslint-config-prettier": "^9.1.0",
@@ -65,8 +70,8 @@
65
70
  "prettier-plugin-organize-imports": "^4.1.0",
66
71
  "prettier-plugin-svelte": "^3.3.2",
67
72
  "prettier-plugin-tailwindcss": "^0.6.9",
68
- "publint": "^0.2.12",
69
- "svelte": "^5.16.1",
73
+ "publint": "^0.3.0",
74
+ "svelte": "^5.16.6",
70
75
  "svelte-check": "^4.1.1",
71
76
  "typescript": "^5.7.2",
72
77
  "vite": "^6.0.7",