Skip to content

Conversation

yordis
Copy link
Contributor

@yordis yordis commented Sep 29, 2025

Extract render_all, build_extras, and filter_list functions from HTML to shared ExDoc.Formatter module to eliminate tight coupling where EPUB directly calls HTML functions.

Changes:

  • Create ExDoc.Formatter with shared functions moved from HTML
  • Update HTML formatter to use Formatter.render_all(), Formatter.build_extras(), Formatter.filter_list()
  • Update EPUB formatter to use Formatter functions instead of HTML.* calls
  • Remove duplicate function definitions from HTML formatter

This provides a foundation for additional formatters while maintaining the existing API and functionality.

@yordis
Copy link
Contributor Author

yordis commented Sep 29, 2025

@josevalim is this what you had in mind? I am doing it chunk by chunk.

Copy link

github-actions bot commented Sep 29, 2025

@josevalim
Copy link
Member

Two minor nits and we can ship it.

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>
@yordis yordis force-pushed the yordis/extract-shared-formatter-logic branch from 052899c to a7e79c2 Compare October 2, 2025 18:20
@josevalim josevalim merged commit 7ce837b into elixir-lang:main Oct 2, 2025
5 checks passed
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants