Skip to content

Commit

Permalink
Remove line from display name
Browse files Browse the repository at this point in the history
  • Loading branch information
Itaybre committed Sep 13, 2024
1 parent 9ce5b90 commit 8c6adf4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions Sources/SnapshotPreviewsCore/SnapshotPreviewsCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,7 @@ public struct PreviewType: Hashable, Identifiable {

public var displayName: String {
if let fileID = fileID {
let basename = String(fileID.split(separator: "/").last!.split(separator: ".").first!)
if let line = line {
return "\(basename)#\(line)"
}
return basename
return String(fileID.split(separator: "/").last!.split(separator: ".").first!)
}
let components = typeName
.split(separator: ".")
Expand Down

0 comments on commit 8c6adf4

Please sign in to comment.