Several quirks in YAML rendering (colon in attribute name)
See original GitHub issueI’d like to report a few problems we are seeing in YAML rendering.
Here is my reference document:
endpoints:
http://localhost:9000:
alias: local
email: developer@example.com
token: 7d5b1161-87e6-4dfd-8017-5ab9f4e1cb14
https://api.g8s.cloud.europe.gigantic.io:
alias: cloud
email: developer@example.com
token: 103dc680-1b53-4ad3-b5cb-ac9b2f86134d
https://api.g8s.onprem.example.com:
alias: onprem
email: developer@example.com
token: ""
selected_endpoint: https://api.g8s.cloud.europe.gigantic.io
last_version_check: 2018-01-25T13:50:25.353937+01:00
updated: 2018-01-26T09:17:24+01:00
That YAML is generated using go-yaml v2.
This is how highlight.js version 9.12.0 renders it with solarized-dark style:
The HTML code for the above:
<pre><code class="language-yaml hljs"><span class="hljs-attr">endpoints:</span>
<span class="hljs-attr"> http:</span><span class="hljs-string">//localhost:9000:</span>
<span class="hljs-attr"> alias:</span> <span class="hljs-string">local</span>
<span class="hljs-attr"> email:</span> <span class="hljs-string">developer@example.com</span>
<span class="hljs-attr"> token:</span> <span class="hljs-number">7</span><span class="hljs-string">d5b1161-87e6-4dfd-8017-5ab9f4e1cb14</span>
<span class="hljs-attr"> https:</span><span class="hljs-string">//api.g8s.cloud.europe.gigantic.io:</span>
<span class="hljs-attr"> alias:</span> <span class="hljs-string">cloud</span>
<span class="hljs-attr"> email:</span> <span class="hljs-string">developer@example.com</span>
<span class="hljs-attr"> token:</span> <span class="hljs-number">103</span><span class="hljs-string">dc680-1b53-4ad3-b5cb-ac9b2f86134d</span>
<span class="hljs-attr"> https:</span><span class="hljs-string">//api.g8s.onprem.example.com:</span>
<span class="hljs-attr"> alias:</span> <span class="hljs-string">onprem</span>
<span class="hljs-attr"> email:</span> <span class="hljs-string">developer@example.com</span>
<span class="hljs-attr"> token:</span> <span class="hljs-string">""</span>
<span class="hljs-attr">selected_endpoint:</span> <span class="hljs-attr">https://api.g8s.cloud.europe.gigantic.io</span>
<span class="hljs-attr">last_version_check:</span> <span class="hljs-number">2018</span><span class="hljs-bullet">-01</span><span class="hljs-bullet">-25</span><span class="hljs-attr">T13:50:25.353937+01:00</span>
<span class="hljs-attr">updated:</span> <span class="hljs-number">2018</span><span class="hljs-bullet">-01</span><span class="hljs-bullet">-26</span><span class="hljs-attr">T09:17:24+01:00</span>
</code></pre>
Issue Analytics
- State:
- Created 6 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top Results From Across the Web
how to access the attribute with colon in ... - Stack Overflow
In values.yaml , the snippet is as below: conf: proxy_server: filter:authtoken: paste.filter_factory: keystonemiddleware.auth_token: ...
Read more >YAML: The Missing Battery in Python
They're made of keys, also known as attribute or property names, followed by a colon ( : ) and a value. You've seen...
Read more >PyYAML Documentation
A multi-constructor is a function that converts a node of a YAML representation graph to a native Python object. A multi-constructor accepts an...
Read more >Class Config (CKEDITOR.config) - CKEditor 4 API docs
It's a string composed by dialog name and tab name with a colon between them. Separate each pair with semicolon (see example).
Read more >snakeyaml - Documentation.wiki - Google Code
It leads to emitting unnecessary global tags with class names. As a consequence a YAML document produced in Java cannot be consumed by...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This was fixed by #2170 but I didn’t do the auto-linking to close it properly
Yes, if you can test against
master
this should be resolved now.