skillwiki 0.2.1-beta.26 → 0.2.1-beta.28

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/dist/cli.js CHANGED
@@ -949,6 +949,7 @@ import { dirname as dirname3, resolve as resolve2, join as join5 } from "path";
949
949
  var FENCE2 = /```[\s\S]*?```/g;
950
950
  var INLINE_CODE = /``[^`\n]+``|`[^`\n]+`/g;
951
951
  var MARKER_RE = /\^\[(raw\/[^\]]+)\]/g;
952
+ var FRONTMATTER = /^---\n[\s\S]*?\n---\n?/;
952
953
  function stripFences(body) {
953
954
  return body.replace(FENCE2, "").replace(INLINE_CODE, "");
954
955
  }
@@ -971,8 +972,9 @@ function isLegacyCitationStyle(body) {
971
972
  const markers = extractCitationMarkers(body);
972
973
  if (markers.length === 0) return false;
973
974
  if (!hasSourcesFooter(body)) return true;
974
- const lines = stripFences(body).split("\n");
975
+ const lines = stripFences(body.replace(FRONTMATTER, "")).split("\n");
975
976
  let inSources = false;
977
+ let lastNonBlankWasTable = false;
976
978
  for (const line of lines) {
977
979
  if (/^## Sources\b/.test(line.trim())) {
978
980
  inSources = true;
@@ -980,19 +982,23 @@ function isLegacyCitationStyle(body) {
980
982
  }
981
983
  if (inSources) continue;
982
984
  const matches = [...line.matchAll(MARKER_RE)];
983
- if (matches.length === 0) continue;
985
+ if (matches.length === 0) {
986
+ if (line.trim().length > 0) lastNonBlankWasTable = /^\|/.test(line.trim());
987
+ continue;
988
+ }
984
989
  const markerOnly = line.replace(MARKER_RE, "").trim();
985
- if (markerOnly.length === 0) return true;
990
+ if (markerOnly.length === 0 && !lastNonBlankWasTable) return true;
991
+ lastNonBlankWasTable = false;
986
992
  const lastMatch = matches[matches.length - 1];
987
993
  const afterLast = line.slice(lastMatch.index + lastMatch[0].length).replace(MARKER_RE, "").trim();
988
994
  if (afterLast.length > 0) return true;
989
995
  const beforeFirst = line.slice(0, matches[0].index).trim();
990
- if (beforeFirst.length > 0 && !/[.!?]\s*$/.test(beforeFirst)) return true;
996
+ if (beforeFirst.length > 0 && !/[.!?]["'"]*\s*$/.test(beforeFirst)) return true;
991
997
  }
992
998
  return false;
993
999
  }
994
1000
  function hasOrphanedCitations(body) {
995
- const stripped = stripFences(body);
1001
+ const stripped = stripFences(body.replace(FRONTMATTER, ""));
996
1002
  const lines = stripped.split("\n");
997
1003
  let inSources = false;
998
1004
  let sourcesEnded = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.2.1-beta.26",
3
+ "version": "0.2.1-beta.28",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.2.1-beta.26",
3
+ "version": "0.2.1-beta.28",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 19 prompt-only skills (wiki-*, proj-*, dev-loop-research, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
6
6
  "author": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.2.1-beta.26",
3
+ "version": "0.2.1-beta.28",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",