Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhancement: extend and improve mapping reliability for Markdown code syntax highlighting #2

Open
7 tasks
Velka-DEV opened this issue Apr 20, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@Velka-DEV
Copy link
Owner

Description

The current implementation of the program uses a predefined extension_map to map file extensions to their corresponding language names for syntax highlighting in Markdown code blocks. While the existing mapping covers some common file extensions, it can be further extended and improved to ensure more accurate and reliable syntax highlighting across a wider range of programming languages and file types.

Proposed changes

  1. Conduct a thorough review of the existing extension_map and identify any missing or incorrect mappings.
  2. Research and gather a comprehensive list of file extensions and their corresponding language names for various programming languages, scripting languages, markup languages, and configuration files.
  3. Update the extension_map with the extended and corrected mappings, ensuring that each file extension is mapped to the appropriate language name for syntax highlighting.
  4. Consider handling cases where multiple language names may be associated with a single file extension. Determine a priority order or fallback mechanism for such cases.
  5. Explore the possibility of using a more robust and standardized mapping source

Benefits

  • Improved accuracy and reliability of syntax highlighting for a wide range of file extensions and programming languages.
  • Better visual representation and readability of code snippets in the generated Markdown files.
  • Reduced likelihood of incorrect or missing syntax highlighting for less common file extensions.
  • Alignment with industry-standard language mappings, such as those used by GitHub, for consistency and familiarity.

Considerations

  • Ensure that the extended extension_map covers a comprehensive set of file extensions and language names, including popular programming languages, scripting languages, markup languages, and configuration files.
  • Consider the maintainability and updatability of the extension_map as new languages and file extensions emerge over time.
  • Evaluate the performance impact of using a larger extension_map or integrating an external library for language mapping, especially for projects with a significant number of files.
  • Provide clear documentation on how the language mapping is determined and how users can customize or override the mapping if needed.

By extending and improving the mapping reliability for Markdown code syntax highlighting, the program will generate more accurate and visually appealing code snippets across a broader range of file types. This enhancement will greatly improve the user experience and make the generated Markdown files more consistent and readable.

Implementation

  • Review the existing extension_map and identify missing or incorrect mappings
  • Research and compile a comprehensive list of file extensions and their corresponding language names
  • Update the extension_map with the extended and corrected mappings
  • Handle cases where multiple language names may be associated with a single file extension
  • Explore the integration of a standardized language mapping source
  • Test the updated mapping thoroughly to ensure accurate syntax highlighting for various file extensions
  • Update the documentation to reflect the extended and improved language mapping capabilities
@Velka-DEV Velka-DEV added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Apr 20, 2024
@Velka-DEV Velka-DEV self-assigned this Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant