kubectl/pkg/util
Arda Güçlü a9dd2e4bec Preserve code blocks in templates.Normalizer (#118029)
* Preserve code blocks in templates.Normalizer

Currently, if templates.LongDesc function is invoked multiple times
for a string including a code block, this code block is converted to
invalid code block.

The reason of this issue is that blackfriday package, which templates package uses, relies on
4 * indentation to detect code blocks. This PR always preserves
4 * indentation in code blocks to always detect it code blocks in also
post invocations.

* Add indentations to test for code blocks

* Use strings.repeat for repetition

Kubernetes-commit: 0bff705acd8982e34b937116eb2016c9d6e4c4a6
2023-05-24 09:20:49 +03:00
..
certificate Add v1 CSR support to kubectl describe 2020-06-04 12:05:51 -04:00
completion Migrate genericclioptions.IOStreams usage to genericiooptions 2023-04-05 14:07:46 +03:00
deployment Generate and format files 2022-07-19 20:54:13 -04:00
event Move pkg/kubectl/util/event into staging 2019-06-19 15:31:51 -07:00
fieldpath Fix quotes that trip up gofmt 2022-07-22 09:19:47 -04:00
hash Immutable field and validation 2019-11-26 13:29:26 +01:00
i18n fix:translations zh_CN LC_MESSAGES k8s.po error 2023-05-10 18:13:28 +08:00
interrupt Moved pkg/kubectl/util/term, pkg/kubectl/util/templates, pkg/kubectl/util/interrupt, and pkg/kubectl/util/interrupt to staging 2019-06-19 16:31:38 +02:00
openapi test: fix ginkgolinter issues 2023-02-22 10:35:09 +01:00
podutils Implement kubectl debug profiles: general, baseline, and restricted (#114280) 2023-02-09 11:18:22 -06:00
prune kubectl-apply: add prune test cases for non-namespaced resources 2022-11-09 07:43:43 +08:00
qos small comment the ephemeral containers are not accounted for the QoS calculation 2023-02-02 18:21:39 +00:00
rbac When combining PolicyRules, don't duplicate verbs 2020-05-18 15:20:06 -04:00
resource Downward API hugepages 2020-11-06 14:22:53 -05:00
slice kubectl apply: Deprecate --prune-whitelist in favor of --prune-allowlist 2022-10-30 20:50:19 -04:00
storage add unit test for /staging/src/k8s.io/kubectl/pkg/util/storage 2022-07-29 17:34:00 +08:00
templates Preserve code blocks in templates.Normalizer (#118029) 2023-05-24 09:20:49 +03:00
term Generate and format files 2022-07-19 20:54:13 -04:00
apply.go Move pkg/kubectl/apply.go to staging 2019-07-24 20:40:25 -07:00
pod_port.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
pod_port_test.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
service_port.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
service_port_test.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00
umask.go generated: Run hack/update-gofmt.sh 2021-08-12 17:13:11 -04:00
umask_windows.go generated: Run hack/update-gofmt.sh 2021-08-12 17:13:11 -04:00
util.go Generate and format files 2022-07-19 20:54:13 -04:00
util_test.go Move pkg/kubectl/util to staging 2019-07-24 11:59:28 -07:00