@smoose/pi-beautify 0.1.7 → 0.1.9
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/package.json +1 -1
- package/src/index.ts +3 -3
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -184,8 +184,8 @@ class ImageTokenController {
|
|
|
184
184
|
|
|
185
185
|
formatClipboardFilePaths(paths: string[], existingText = ""): string {
|
|
186
186
|
const usedIds = this.collectUsedIds(existingText);
|
|
187
|
-
const pieces = paths.map((path) => (IMAGE_FILE_RE.test(path) ? this.createImageToken(path, usedIds)
|
|
188
|
-
return pieces.
|
|
187
|
+
const pieces = paths.map((path) => (IMAGE_FILE_RE.test(path) ? this.createImageToken(path, usedIds) : path));
|
|
188
|
+
return pieces.join(paths.length > 1 ? "\n" : "");
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
replaceClipboardPathsInEditor(editor: EditorComponent, tui: TUI): void {
|
|
@@ -253,7 +253,7 @@ class ImageTokenController {
|
|
|
253
253
|
usedIds.add(id);
|
|
254
254
|
const token = imageChip(id);
|
|
255
255
|
this.attachments.set(token, { token, path });
|
|
256
|
-
return
|
|
256
|
+
return token;
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
259
|
|