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

Replace tabs by spaces in glossary-terms partials #15408

Merged

Conversation

raelga
Copy link
Member

@raelga raelga commented Jul 13, 2019

Using tabs in this html-partial used in the glossary-tooltip shortcode seems to cause Hugo to parse the shortcode as a <pre><code> block instead of rendering the resulting HTML code.

Solves #14792 rendering issues:

  • With tabs:
<pre><code>&lt;a class='glossary-tooltip' href='/docs/concepts/workloads/pods/pod-overview/' target='_blank'&gt;Pod&lt;span class='tooltip-text'&gt;Unit Kubernetes yang paling sederhana dan kecil. Sebuah Pod merepresentasikan sebuah set kontainer yang dijalankan pada kluster kamu.&lt;/span&gt;
</code></pre>
  • With spaces:
<p><a class='glossary-tooltip' href='/docs/concepts/workloads/pods/pod-overview/' target='_blank'>Pod<span class='tooltip-text'>Unit Kubernetes yang paling sederhana dan kecil. Sebuah Pod merepresentasikan sebuah set kontainer yang dijalankan pada kluster kamu.</span>

/cc @bep @zacharysarah @irvifa @sftim @girikuncoro

Using tabs in this partials seems to cause Hugo to parse the partial
as a code block instead of rendering the HTML code.

Solves kubernetes#14792 rendering issues.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 13, 2019
@k8s-ci-robot k8s-ci-robot requested a review from sftim July 13, 2019 13:57
@k8s-ci-robot
Copy link
Contributor

@raelga: GitHub didn't allow me to request PR reviews from the following users: bep.

Note that only kubernetes members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

Using tabs in this partials seems to cause Hugo to parse the partial as a code block instead of rendering the HTML code.

Solves #14792 rendering issues.

/cc @bep @zacharysarah @irvifa @sftim @girikuncoro

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/test-infra repository.

@k8s-ci-robot k8s-ci-robot requested a review from girikuncoro July 13, 2019 13:57
@k8s-ci-robot k8s-ci-robot added sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jul 13, 2019
@irvifa
Copy link
Member

irvifa commented Jul 13, 2019

Thanks @raelga can you give me a reference why i should use spaces instead of tabs

@netlify
Copy link

netlify bot commented Jul 13, 2019

Deploy preview for kubernetes-io-master-staging ready!

Built with commit 9458a48

https://deploy-preview-15408--kubernetes-io-master-staging.netlify.com

@irvifa
Copy link
Member

irvifa commented Jul 13, 2019

/assign @steveperry-53

@raelga
Copy link
Member Author

raelga commented Jul 13, 2019

I'm not really sure why but looks like Hugo, while parsing the HTML partial reads the tabs, interprets the resulting Markdown as a code block and encapsulates it between a <pre><code> block.

<pre><code>&lt;a class='glossary-tooltip' href='/docs/concepts/workloads/pods/pod-overview/' target='_blank'&gt;Pod&lt;span class='tooltip-text'&gt;Unit Kubernetes yang paling sederhana dan kecil. Sebuah Pod merepresentasikan sebuah set kontainer yang dijalankan pada kluster kamu.&lt;/span&gt;
</code></pre>
  • With spaces:
<p><a class='glossary-tooltip' href='/docs/concepts/workloads/pods/pod-overview/' target='_blank'>Pod<span class='tooltip-text'>Unit Kubernetes yang paling sederhana dan kecil. Sebuah Pod merepresentasikan sebuah set kontainer yang dijalankan pada kluster kamu.</span>

Maybe is related to gohugoio/hugo#4717.

@irvifa
Copy link
Member

irvifa commented Jul 14, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 14, 2019
@zacharysarah
Copy link
Contributor

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: zacharysarah

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

The pull request process is described 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 approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 14, 2019
@k8s-ci-robot k8s-ci-robot merged commit c138c9c into kubernetes:master Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. sig/docs Categorizes an issue or PR as relevant to SIG Docs. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants