[Bug]: .md Naively Removed From Filenames (Display-Only)

by ADMIN 59 views

Bug Report: ".md" Naively Removed From Filenames (Display-Only)

As a user of the Obsidian plugin, we appreciate the hard work and dedication that goes into creating and maintaining this valuable tool. However, we have encountered a bug that affects the display of files in the Changes view. In this article, we will describe the issue, provide relevant information, and outline the steps to reproduce the problem.

The bug in question is related to the removal of the .md extension from filenames that contain it, but are not Markdown files. This results in inaccurate display in the Changes view. The issue is not limited to Markdown files, but rather affects any file that has .md in its name.

Problem Description

When a file with .md in its name, but not a Markdown file, is changed and the Changes view is refreshed, the .md extension is naively removed. This is evident in the following image:

Image

In this case, the context.mdb file generated by make.md is displayed as contextb. This is incorrect, as the .md extension should be preserved.

To provide a better understanding of the issue, we have included the following system information:

  • Operating System: Windows 11 24H2
  • Obsidian Version: 1.8.9

There are no relevant errors from notifications or console (CTRL+SHIFT+I) that can be provided.

To reproduce the issue, follow these steps:

  1. Change a file that has .md in its name somewhere but is not a Markdown file.
  2. Refresh the Changes view.

The expected behavior is that the .md extension should only be removed if it's the complete extension at the end of a file. Otherwise, it should be preserved.

Unfortunately, there is no additional context that can be provided.

The operating system in use is Windows.

The plugin was installed using the default method.

The plugin version is 2.32.0.

In conclusion, the bug in question affects the display of files in the Changes view when they contain .md in their name, but are not Markdown files. We hope that this report will help to identify and resolve the issue. Thank you for your attention to this matter.

To resolve this issue, we recommend that the plugin developers implement a more robust method for handling filenames that contain .md but are not Markdown files. This could involve checking the file type or extension before removing the .md extension.

In the future, it would be beneficial to include more information about the file type or extension when displaying files in the Changes view. This would help to prevent similar issues from arising in the future.

If you have any additional information or context that may be relevant to this issue, please do not hesitate to share it. We appreciate your help in resolving this bug.
Bug Report: ".md" Naively Removed From Filenames (Display-Only) - Q&A

As a follow-up to our previous article, we have compiled a list of frequently asked questions (FAQs) related to the bug in question. This Q&A article aims to provide additional information and clarify any doubts that may have arisen from the original report.

Q: What is the bug in question?

A: The bug in question is related to the removal of the .md extension from filenames that contain it, but are not Markdown files. This results in inaccurate display in the Changes view.

Q: What is the expected behavior?

A: The expected behavior is that the .md extension should only be removed if it's the complete extension at the end of a file. Otherwise, it should be preserved.

Q: What are the steps to reproduce the issue?

A: To reproduce the issue, follow these steps:

  1. Change a file that has .md in its name somewhere but is not a Markdown file.
  2. Refresh the Changes view.

Q: What is the impact of this bug?

A: The impact of this bug is that files with .md in their name, but are not Markdown files, will be displayed incorrectly in the Changes view.

Q: What operating systems are affected?

A: The bug in question affects Windows 11 24H2.

Q: What Obsidian version is affected?

A: The bug in question affects Obsidian version 1.8.9.

Q: What plugin version is affected?

A: The bug in question affects plugin version 2.32.0.

Q: How can I report similar issues?

A: If you encounter similar issues, please report them to the plugin developers using the same format as this article.

Q: What can I do to prevent this issue?

A: To prevent this issue, you can avoid using filenames that contain .md but are not Markdown files.

Q: Will this issue be fixed?

A: We hope that the plugin developers will address this issue and provide a fix in a future update.

Q: How can I stay updated on the status of this issue?

A: You can stay updated on the status of this issue by following the plugin developers' updates and announcements.

In conclusion, this Q&A article aims to provide additional information and clarify any doubts that may have arisen from the original report. We hope that this article has been helpful in understanding the bug in question and its impact.

To prevent similar issues from arising in the future, we recommend that the plugin developers implement a more robust method for handling filenames that contain .md but are not Markdown files.

In the future, it would be beneficial to include more information about the file type or extension when displaying files in the Changes view. This would help to prevent similar issues from arising in the future.

If you have any additional questions or concerns, please do not hesitate to reach out to us. We are here to help and provide any necessary information.