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

The tool of markdown maybe have a bug. #16510

Closed
diguage opened this issue Sep 23, 2019 · 7 comments
Closed

The tool of markdown maybe have a bug. #16510

diguage opened this issue Sep 23, 2019 · 7 comments
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@diguage
Copy link
Contributor

diguage commented Sep 23, 2019

I sent a PR for fixing a document style bug: fix markdown syntax by diguage · Pull Request #16452 · kubernetes/website

I review the render result, and I found the tool of Markdown maybe have a bug.

Before I fix the error:

    On Fedora, edit `/etc/kubernetes/kubelet` to include this line:

    ```
    KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --manifest-url=<manifest-url>`
    ```

Now, restart the kubelet. On Fedora, you would run:

    ```shell
    # Run this command on the node where the kubelet is running
    systemctl restart kubelet
    ```

https://kubernetes.io/docs/tasks/configure-pod-container/static-pod/

image

The four spaces shoud be render as the source code block. So the source code blocks in the four spacke block do not be render as the source code.

The blockquote tag should be used in the case.

After:

> On Fedora, edit `/etc/kubernetes/kubelet` to include this line:
>
> ```
> KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --manifest-url=<manifest-url>`
> ```
>
> Now, restart the kubelet. On Fedora, you would run:
>
> ```shell
> # Run this command on the node where the kubelet is running
> systemctl restart kubelet
> ```

https://deploy-preview-16452--kubernetes-io-master-staging.netlify.com/docs/tasks/configure-pod-container/static-pod/

image

But the blockquote tag does not be render in the right way.

Right render

But it should render like as following (Preview on VS Code):

image

@sftim
Copy link
Contributor

sftim commented Sep 23, 2019

The way I see it, the rendering via Hugo is canonical. Visual Studio Code's preview is a hint at how the source might get rendered.

Would you agree with
/triage support
@diguage?

@k8s-ci-robot k8s-ci-robot added the kind/support Categorizes issue or PR as a support question. label Sep 23, 2019
@diguage
Copy link
Contributor Author

diguage commented Sep 23, 2019

@sftim

Visual Studio Code's preview is a hint at how the source might get rendered.

Sorry, I don't agress with the statement.

The > tags are a blockquote tag of Markdown.

There are two guides for Markdown which explains the syntax.

@sftim
Copy link
Contributor

sftim commented Sep 23, 2019

/remove-triage support
Sounds like there's more to discuss.

@k8s-ci-robot k8s-ci-robot removed the kind/support Categorizes issue or PR as a support question. label Sep 23, 2019
@aimeeu
Copy link
Contributor

aimeeu commented Sep 23, 2019

Hi @diguage - I think Hugo is rendering the Markdown correctly.

Repeating part of the comment I left on your PR #16452:

Thanks for all the detail! Using blockquote '>' syntax: markdownguide.org's blockquotes with other elements section says "Blockquotes can contain other Markdown formatted elements. Not all elements can be used — you’ll need to experiment to see which ones work." So nesting code block syntax inside of blockquote syntax doesn't work.


For everyone reading this Issue: regarding the 4 spaces (or 1 tab) at the beginning of L135-139: if you want some text to show up exactly as you write it, without Markdown doing anything to it, indent every line by at least 4 spaces (or 1 tab).
Rendered:
issue16510

Code:
issue16510-code

Looking at the source code file, the 4 spaces (or 1 tab) at the beginning of each line 135-139 is a mistake. Those spaces should be removed - those lines should not be a blockquote.

If you install Hugo, you can test your changes locally. Hugo uses the BlackFriday Markdown processor.

@aimeeu
Copy link
Contributor

aimeeu commented Sep 23, 2019

/priority awaiting-more-evidence

@k8s-ci-robot k8s-ci-robot added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Sep 23, 2019
@diguage
Copy link
Contributor Author

diguage commented Sep 24, 2019

I used to use the GitHub Format Markdown.
Markdown has too many dialects. There are many differences amount the dialects.
Let me learn the BlackFriday Markdown processor. 😆

@sftim
Copy link
Contributor

sftim commented Sep 24, 2019

@diguage are you OK to close this issue?

@diguage diguage closed this as completed Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

4 participants