Skip to content

Binaries in -moduledocs are silently swallowed #10901

@eproxus

Description

@eproxus

Describe the bug

Using binaries or sigils in -moduledoc is silently swallowed and only produces none in doc chunks. This is inconsistent with the -doc attribute which accept all forms of strings.

The documentation doesn't really specify the allowed format but mentions the word "string" a few times.

This took a long while to debug after discovering that ex_doc didn't add my module descriptions 😅

To Reproduce

Format -moduledoc -doc
"string" ✅ works ✅ works
"""triple""" ✅ works ✅ works
<<"binary">> ⚠️ none ✅ works
~"sigil" ⚠️ none ✅ works
~"""triple""" ⚠️ none ✅ works

Expected behavior

All formats work everywhere. Or at least an error if the format is not allowed.

Affected versions

28.4.1

Additional context

None.

Metadata

Metadata

Assignees

Labels

bugIssue is reported as a bugteam:VMAssigned to OTP team VM

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions