Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove html tag escaping in chapter-single-definition.tmpl #47089

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

robert-cronin
Copy link
Contributor

This PR is part of a two-PR solution to address issue #35712: Code blocks not rendering properly in API Documentation (Quantity).

Current problem:
The Quantity description in the Kubernetes API documentation contains a code block that is not being rendered correctly. Instead of proper formatting, the code is displayed as a single line, making it difficult to read and understand.

Proposed solution:
This PR, along with a companion PR in the kubernetes-sigs/reference-docs repository, aims to improve the rendering of code blocks within the API documentation, specifically targeting the Quantity resource description.

Current status:

  1. I've added a basic working example for the approach in the kubernetes-sigs/reference-docs repo.
  2. This PR complements that change by removing an escaping operator for the Description field.

Known limitation:
The following lines are still rendered on a single line due to newline characters not being captured in the Swagger JSON:

// <digit>           ::= 0 | 1 | ... | 9
// <digits>          ::= <digit> | <digit><digits>
// <number>          ::= <digits> | <digits>.<digits> | <digits>. | .<digits>
// <sign>            ::= "+" | "-"
// <signedNumber>    ::= <number> | <sign><number>
// <suffix>          ::= <binarySI> | <decimalExponent> | <decimalSI>
// <binarySI>        ::= Ki | Mi | Gi | Ti | Pi | Ei

Seeking feedback:
I'm looking for input on whether this approach is the right direction to solve the issue. Specifically:

  1. Is the proposed solution addressing the root cause of the rendering problem?
  2. Are there any potential side effects or considerations I should be aware of?
  3. How should we address the remaining issue with newline characters in the Swagger JSON?

Screenshots:
image

Companion PRs:
kubernetes-sigs/reference-docs#365

Any feedback or suggestions for improvement are greatly appreciated. Thank you for your time and input!

@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 4, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign divya-mohan0209 for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the language/en Issues or PRs related to English language label Jul 4, 2024
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 4, 2024
Copy link

netlify bot commented Jul 4, 2024

Pull request preview available for checking

Built without sensitive environment variables

Name Link
🔨 Latest commit d91fa4c
🔍 Latest deploy log https://app.netlify.com/sites/kubernetes-io-main-staging/deploys/66966040384f5f0009832160
😎 Deploy Preview https://deploy-preview-47089--kubernetes-io-main-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sftim
Copy link
Contributor

sftim commented Jul 4, 2024

I think the fix to the OpenAPI generation (preserving newlines) should happen in k/k

@Jefftree
Copy link
Member

Jefftree commented Jul 4, 2024

I think the fix to the OpenAPI generation (preserving newlines) should happen in k/k

+1, more specifically in the OpenAPI generation most likely in k/kube-openapi. That only solves 3 though, so this PR and kubernetes-sigs/reference-docs#365 are still necessary to make everything fit together.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 16, 2024
@robert-cronin robert-cronin marked this pull request as ready for review July 16, 2024 12:01
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 16, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 4, 2024
@k8s-ci-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. language/en Issues or PRs related to English language needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants