@cccarv82/freya 1.0.14 → 1.0.15

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.
Files changed (2) hide show
  1. package/cli/web.js +4 -3
  2. package/package.json +1 -1
package/cli/web.js CHANGED
@@ -873,6 +873,7 @@ function html(defaultDir) {
873
873
  let inCode = false;
874
874
  let inList = false;
875
875
 
876
+ const NL = String.fromCharCode(10);
876
877
  const BT = String.fromCharCode(96); // backtick
877
878
  const FENCE = BT + BT + BT;
878
879
  const inlineCodeRe = /\x60([^\x60]+)\x60/g;
@@ -895,11 +896,11 @@ function html(defaultDir) {
895
896
  }
896
897
 
897
898
  if (inCode) {
898
- html += escapeHtml(line) + '\n';
899
+ html += escapeHtml(line) + NL;
899
900
  continue;
900
901
  }
901
902
 
902
- const h = line.match(/^(#{1,3})\s+(.*)$/);
903
+ const h = line.match(/^(#{1,3})[ \t]+(.*)$/);
903
904
  if (h) {
904
905
  closeList();
905
906
  const lvl = h[1].length;
@@ -907,7 +908,7 @@ function html(defaultDir) {
907
908
  continue;
908
909
  }
909
910
 
910
- const li = line.match(/^\s*[-*]\s+(.*)$/);
911
+ const li = line.match(/^[ \t]*[-*][ \t]+(.*)$/);
911
912
  if (li) {
912
913
  if (!inList) { html += '<ul class="md-ul">'; inList = true; }
913
914
  const content = escapeHtml(li[1]).replace(inlineCodeRe, '<code class="md-inline">$1</code>');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cccarv82/freya",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "Personal AI Assistant with local-first persistence",
5
5
  "scripts": {
6
6
  "health": "node scripts/validate-data.js",