Skip to content

helm-tool inject adds trailing white space to the generated markdown #26

@wallrj

Description

@wallrj

In cert-manager/approver-policy#383 I noticed some trailing white space added to the generated Helm README.

image

Perhaps it's deliberate, to generate markdown linebreaks, but it seems to put them in unusual places.

For example:

https://github.com/cert-manager/approver-policy/blob/e5203e235ef041994bc0b2fd1c8756c5108460cd/deploy/charts/approver-policy/values.yaml#L6-L11

  # This option makes it so that the "helm.sh/resource-policy": keep
  # annotation is added to the CRD. This will prevent Helm from uninstalling
  # the CRD when the Helm release is uninstalled.
  # WARNING: when the CRDs are removed, all cert-manager custom resources
  # (Certificates, Issuers, ...) will be removed too by the garbage collector.
  keep: true

Becomes:

https://github.com/cert-manager/approver-policy/blob/e5203e235ef041994bc0b2fd1c8756c5108460cd/deploy/charts/approver-policy/README.md#L16-L23

#### **crds.keep** ~ `bool`
> Default value:
> ```yaml
> true
> ```


This option makes it so that the "helm.sh/resource-policy": keep annotation is added to the CRD. This will prevent Helm from uninstalling the CRD when the Helm release is uninstalled. WARNING: when the CRDs are removed, all cert-manager custom resources  
(Certificates, Issuers, ...) will be removed too by the garbage collector.

Notice how WARNING line (which should be on it's own line) has been flowed in to the previous sentence.
And the line break (double trailing space) has been added half way into the WARNING sentence.

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions