Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
ui(FileNavigationBar): Show full filename if not markdown file
Browse files Browse the repository at this point in the history
  • Loading branch information
iakdis committed Mar 31, 2023
1 parent ece78c4 commit 453c4d3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/src/widgets/file_navigation/files_navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ class _FilesNavigationDrawerState extends State<FilesNavigationDrawer>
key: UniqueKey(),
color: Colors.transparent,
child: FileButton(
buttonText: path.substring(0, path.length - 3),
buttonText: path.endsWith('.md')
? path.substring(0, path.length - 3)
: path.endsWith('.markdown')
? path.substring(0, path.length - 9)
: path,
index: finalIndex,
path: snapshot.data?[index].path ?? 'No file path found',
isExtended: isExtended,
Expand Down

0 comments on commit 453c4d3

Please sign in to comment.