@ethlete/core 5.0.0-next.17 → 5.0.0-next.19

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @ethlete/core
2
2
 
3
+ ## 5.0.0-next.19
4
+
5
+ ### Minor Changes
6
+
7
+ - [#3006](https://github.com/ethlete-io/ethdk/pull/3006) [`f6b9c10`](https://github.com/ethlete-io/ethdk/commit/f6b9c10b9702722d55a8a815ad9539a92c65e20a) Thanks [@TomTomB](https://github.com/TomTomB)! - Add `runtimePrefix` option to the `tailwind-4-color-theme` generator. This decouples the Tailwind utility color prefix (`prefix`, e.g. `bg-fut-primary`) from the runtime theme-swap prefix used by `ProvideColorDirective`/`etProvideColor` (the `.et-color--<name>` selectors and `--et-color-primary` CSS variables). Previously both were driven by the same `prefix` value, which broke consumers whose Tailwind utility naming convention differs from their runtime theme-switching convention. `runtimePrefix` defaults to `prefix`, so existing usages are unaffected.
8
+
9
+ ### Patch Changes
10
+
11
+ - [#3003](https://github.com/ethlete-io/ethdk/pull/3003) [`e7f482b`](https://github.com/ethlete-io/ethdk/commit/e7f482bc170b27374c03cd84b1a5df23ceda9bf6) Thanks [@github-actions](https://github.com/apps/github-actions)! - Fix markdown headings not being parsed when directly followed by a list or paragraph without a blank line
12
+
13
+ ## 5.0.0-next.18
14
+
15
+ ### Patch Changes
16
+
17
+ - [`d7c4fbe`](https://github.com/ethlete-io/ethdk/commit/d7c4fbe23359ebf68e4f769ac6eda05ce01f90c8) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix broken heading support in markdown utils
18
+
3
19
  ## 5.0.0-next.17
4
20
 
5
21
  ### Minor Changes
@@ -2677,6 +2677,10 @@ const markdownToHtml = (markdown) => {
2677
2677
  const idx = codeBlocks.push(`<pre><code${langAttr}>${escapeHtml(code.trim())}</code></pre>`) - 1;
2678
2678
  return makePlaceholder('CODE', idx);
2679
2679
  });
2680
+ // Markdown headings don't require blank lines around them, but blocks are
2681
+ // split on blank lines below. Isolate each heading line into its own block so
2682
+ // a heading directly followed by a list/paragraph isn't swallowed into it.
2683
+ text = text.replace(/^(#{1,6}\s+.+)$/gm, '\n\n$1\n\n');
2680
2684
  const html = text
2681
2685
  .split(/\n\n+/)
2682
2686
  .map((block) => {
@@ -2758,9 +2762,10 @@ const htmlToMarkdown = (html) => {
2758
2762
  md = md.replace(/<pre[^>]*><code[^>]*class="language-([^"]+)"[^>]*>([\s\S]*?)<\/code><\/pre>/gi, (_, lang, code) => `\n\`\`\`${lang}\n${unescapeHtml(code.trim())}\n\`\`\`\n`);
2759
2763
  md = md.replace(/<pre[^>]*><code[^>]*>([\s\S]*?)<\/code><\/pre>/gi, (_, code) => `\n\`\`\`\n${unescapeHtml(code.trim())}\n\`\`\`\n`);
2760
2764
  md = md.replace(/<pre[^>]*>([\s\S]*?)<\/pre>/gi, (_, code) => `\n\`\`\`\n${unescapeHtml(code.trim())}\n\`\`\`\n`);
2761
- // Headings
2765
+ // Headings — keep the inner markup so the inline passes below turn any nested
2766
+ // bold/italic/link/code into markdown; leftover tags are stripped at the end.
2762
2767
  for (let i = 6; i >= 1; i--) {
2763
- md = md.replace(new RegExp(`<h${i}[^>]*>([\\s\\S]*?)<\\/h${i}>`, 'gi'), (_, content) => `\n${'#'.repeat(i)} ${stripTags(content).trim()}\n`);
2768
+ md = md.replace(new RegExp(`<h${i}[^>]*>([\\s\\S]*?)<\\/h${i}>`, 'gi'), (_, content) => `\n${'#'.repeat(i)} ${content.trim()}\n`);
2764
2769
  }
2765
2770
  // Bold + italic (combined before individual)
2766
2771
  md = md.replace(/<strong[^>]*><em[^>]*>([\s\S]*?)<\/em><\/strong>/gi, '***$1***');