@dunkinfrunkin/mdcat 0.1.17 → 0.1.18

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/package.json +1 -1
  2. package/src/cli.js +2 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dunkinfrunkin/mdcat",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "View markdown files beautifully in your terminal",
5
5
  "type": "module",
6
6
  "bin": {
package/src/cli.js CHANGED
@@ -210,9 +210,10 @@ if (!process.stdin.isTTY && fileArgs.length === 0) {
210
210
  }
211
211
 
212
212
  const { title, content } = concatFiles(parts);
213
+ const primaryPath = parts.length === 1 ? resolve(fileArgs[0]) : undefined;
213
214
 
214
215
  if (docMode) exportDocx(title, content);
215
216
  else if (webMode) openInBrowser(title, content);
216
217
  else if (plainMode) runPlain(content);
217
- else runTUI(title, content, filePath);
218
+ else runTUI(title, content, primaryPath);
218
219
  }