You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Marked.js currently lacks support for customizable tab handling within Markdown code blocks. This feature would allow users to specify tab width and customize tab behavior within code blocks, enhancing the flexibility and usability of Marked.js for Markdown parsing.
Why is this feature necessary?
The ability to customize tab handling is essential for users who work with Markdown documents containing code blocks. Different projects and coding styles may require varying tab widths and behaviors, and providing this customization option would improve the overall experience of using Marked.js for Markdown rendering. @daniel-santos @timabbott @zulip (zulip/zulip#29044)
Proposal
I propose extending Marked.js to support the parsing of Markdown code blocks with customizable tab handling. This enhancement would involve adding functionality to interpret additional parameters within code blocks, such as specifying the tab width using a syntax like ts=. Implementation Details
To implement this feature, the following steps could be taken:
Extend the parser to recognize and interpret the ts= syntax within fenced code blocks.
Implement logic to adjust the tab width based on the specified parameter .
Ensure that the parsing of code blocks remains efficient and compatible with existing Markdown syntax.
Benefits
• Provides users with greater control over tab handling within code blocks, accommodating projects that still use tabs for indentation.
• Enhances the versatility and usability of Marked.js for a wider range of Markdown formatting requirements.
Alternatives Considered
Alternative solutions might include using external Markdown rendering libraries or manually processing Markdown documents to customize tab behavior. However, these approaches are less efficient and would require additional effort from users.
By adding support for customizable tab handling in Markdown code blocks, Marked.js can better align with established Markdown specifications and meet the diverse needs of its user base.
The text was updated successfully, but these errors were encountered:
I'm not aware of any; as I noted in zulip/zulip#29044 which seems to have inspired @ArfaNada to open this issue, my question there was whether there is any prior art for the original reporter's problem statement. So I think @ArfaNada might have been confused.
Description
Marked.js currently lacks support for customizable tab handling within Markdown code blocks. This feature would allow users to specify tab width and customize tab behavior within code blocks, enhancing the flexibility and usability of Marked.js for Markdown parsing.
Why is this feature necessary?
The ability to customize tab handling is essential for users who work with Markdown documents containing code blocks. Different projects and coding styles may require varying tab widths and behaviors, and providing this customization option would improve the overall experience of using Marked.js for Markdown rendering.
@daniel-santos
@timabbott
@zulip (zulip/zulip#29044)
Proposal
I propose extending Marked.js to support the parsing of Markdown code blocks with customizable tab handling. This enhancement would involve adding functionality to interpret additional parameters within code blocks, such as specifying the tab width using a syntax like ts=.
Implementation Details
To implement this feature, the following steps could be taken:
Benefits
• Provides users with greater control over tab handling within code blocks, accommodating projects that still use tabs for indentation.
• Enhances the versatility and usability of Marked.js for a wider range of Markdown formatting requirements.
Alternatives Considered
Alternative solutions might include using external Markdown rendering libraries or manually processing Markdown documents to customize tab behavior. However, these approaches are less efficient and would require additional effort from users.
By adding support for customizable tab handling in Markdown code blocks, Marked.js can better align with established Markdown specifications and meet the diverse needs of its user base.
The text was updated successfully, but these errors were encountered: