Closed apinnick closed 1 year ago
Please provide a PR with a failing test / scenario and I will look into fixing it.
This is not a problem with kramdoc. Kramdown does not see this as valid Markdown. The problem is the lack of space between the blocks and the lack of indentation in this list. This would be the proper Markdown syntax:
This is an example of a procedure with a yaml code block that does not convert correctly.
1. blah blah
2. Check each outdated VMI to determine whether it is live-migratable:
```bash
$ kubectl get vmi <vmi> -o yaml
```
Example output:
```yaml
apiVersion: kubevirt.io/v1
kind: VirtualMachineInstance
...
status:
conditions:
- lastProbeTime: null
lastTransitionTime: null
message: cannot migrate VMI which does not use masquerade to connect to the pod network
reason: InterfaceNotLiveMigratable
status: "False"
type: LiveMigratable
```
This library is named kramdown-asciidoc for a reason. It relies on kramdown to parse the Markdown. We can only use what kramdown gives us. If it doesn't parse something correctly, then the problem is with kramdown. If you believe the Markdown you are using is, in fact, correct, you can make your case with the kramdown project.
After investigation, it was determined the the input Markdown is not valid (at least not according to kramdown).
This is not a problem with kramdoc. Kramdown does not see this as valid Markdown.
Thank-you!!! I will fix my files
If a YAML code block has 2 or more lines of text before it, the YAML indentation is mangled. The only workaround I have found is to leave a blank line above the code block. However, this means that I have to manually edit the Asciidoc file to add "+" before the YAML block.
YAML code block without blank line:
Result:
YAML code block with blank line:
Result: