Skip to content

Optional auto-insert of erdify markers for --inject #91

Description

@FabianClemenz

Context

Deferred from the --inject design (markdown injection, v0.10.0). The initial
implementation requires the target file to exist and already contain
<!-- erdify:start --> / <!-- erdify:end --> markers; otherwise it errors and
changes nothing ("docs are sacred — never surprise-edit").

Idea (future, opt-in)

An opt-in flag (e.g. --inject-create / --inject-append) that, when markers
are absent:

  • appends a fresh marker block to the end of the file, and/or
  • creates the target file if it does not exist.

Kept behind an explicit flag so the default stays non-destructive.

Why deferred (YAGNI)

The common case is a README with markers placed once by hand. Auto-insertion
needs decisions about where to append (end of file? after the first heading?)
and how to interact with --check. Not worth the surface until requested.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    deferredParked by design; revisit when a real need shows upenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions