Commit Graph

6 Commits

Author SHA1 Message Date
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
Paco Xu e0b132cd00 add unit test for normalizer rendering markdown
Kubernetes-commit: 9d2be187e550604879ad33d99379550b6fbebc3b
2022-09-27 14:06:40 +08:00
Paco Xu 8402e4686d implement blackfriday render using v2
Kubernetes-commit: baedc1cd3201421a3c90f30876c1a6ae0b0df927
2022-09-26 16:56:20 +08:00
Jordan Liggitt ad76eea5b3 go1.14: fix gofmt errors
Kubernetes-commit: 14845f0c2d66697be0ae8bce4e1de9d9aad6c796
2020-06-23 15:06:11 -04:00
Guangming Wang 26aadcf184 fix: add space in front of url in command desc
Kubernetes-commit: 016fe425e56f852bf2703c2548d23fb288f9ece2
2019-12-02 23:30:27 +08:00
Peter Swica 9a7c9cace9 Moved pkg/kubectl/util/term, pkg/kubectl/util/templates, pkg/kubectl/util/interrupt, and pkg/kubectl/util/interrupt to staging
Kubernetes-commit: 123fa89f2116a9fd144551631925b96c872db293
2019-06-19 16:31:38 +02:00