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
Our current implementation utilizes a custom data structure for representing generated HTML code, which is then converted into a string with our custom formatting logic. While this method serves its purpose, it's becoming apparent that adopting a more standardized approach could offer significant benefits. Specifically, integrating the hast (Hypertext/HTML Abstract Syntax Tree) package from the Unified Collective could streamline our processes and offer additional functionality through its ecosystem of plugins.
Current Implementation Details
Method: Custom data structure for HTML representation.
Conversion: Custom logic for transforming the data structure to a string (HTML to string transformation).
Formatting: Custom, internally developed formatting rules and logic.
Proposed Changes
Integrate hast Package: Shift from our custom implementation to using hast for representing HTML code in an AST format. hast is a part of the Unified Collective, a well-established ecosystem focusing on content as structured data.
Utilize rehype-format Plugin: Adopt the rehype-format plugin (rehypejs/rehype-format) to leverage its advanced formatting capabilities for the hast representation of our generated code. This will ensure that our HTML output is not only more standardized but also cleaner and easier to read.
Benefits of the Proposed Changes
Standardization: By using a widely adopted format like hast, our codebase aligns with industry standards, making it easier for new developers to understand and contribute.
Extensibility: The vast array of plugins available in the hast ecosystem opens up opportunities for future enhancements without significant custom development.
Improved Formatting: With rehype-format, we can automatically ensure consistent and readable code formatting, reducing the need for manual adjustments and reviews.
Community Support: Leveraging community-maintained packages often comes with the benefit of regular updates and a broader support network for troubleshooting and enhancements.
The text was updated successfully, but these errors were encountered:
Our current implementation utilizes a custom data structure for representing generated HTML code, which is then converted into a string with our custom formatting logic. While this method serves its purpose, it's becoming apparent that adopting a more standardized approach could offer significant benefits. Specifically, integrating the hast (Hypertext/HTML Abstract Syntax Tree) package from the Unified Collective could streamline our processes and offer additional functionality through its ecosystem of plugins.
Current Implementation Details
Proposed Changes
Benefits of the Proposed Changes
The text was updated successfully, but these errors were encountered: