YAML supports inline comments, but does not support block comments.
From Wikipedia:
Comments begin with the number sign (
#
), can start anywhere on a line, and continue until the end of the line
A comparison with JSON, also from Wikipedia:
The syntax differences are subtle and seldom arise in practice: JSON allows extended charactersets like UTF-32, YAML requires a space after separators like comma, equals, and colon while JSON does not, and some non-standard implementations of JSON extend the grammar to include Javascript’s
/* ... */
comments. Handling such edge cases may require light pre-processing of the JSON before parsing as in-line YAML.
# If you want to write # a block-commented Haiku # you'll need three pound signs
Related Posts:
- YAML Multi-Line Arrays
- YAML mapping values are not allowed in this context
- Is there a way to create multiline comments in Python?
- Is it bad practice to comment out single lines of CSS with //?
- Can comments be used in JSON?
- Can comments be used in JSON?
- How do I comment out a block of tags in XML?
- Is there a way to convert all comments into javadoc comments? [Eclipse/Java]
- How do I comment out a block of tags in XML?
- How can I parse a YAML file in Python
- Can comments be used in JSON?
- How do you comment out code in PowerShell?
- How do I break a string in YAML over multiple lines?
- What is the difference between YAML and JSON?
- Comments in Markdown
- How to fix “mapping values are not allowed in this context ” error in yaml file?
- Comments in Markdown
- YAML equivalent of array of objects in JSON
- Visual Studio /**/ comment shortcut?
- How do I install the yaml package for Python?
- How to “comment-out” (add comment) in a batch/cmd?
- Is ‘# -*- coding: utf-8 -*-‘ also a comment in Python?
- What is the difference between .yaml and .yml extension? [duplicate]
- How to add comments into a Xaml file in WPF?
- Is it possible to have a multi-line comments in R?
- What is the common header format of Python files?
- How to “comment-out” (add comment) in a batch/cmd?
- Multi-Line Comments in Ruby?
- Error parsing yaml file: mapping values are not allowed here
- How to comment and uncomment blocks of code in the Office VBA Editor
- How to write a comment in a Razor view?
- How to write an inline-comment in Python
- Python and PYAML – yaml.scanner.ScannerError: mapping values are not allowed here
- R: Comment out block of code
- What’s a quick way to comment/uncomment lines in Vim?
- single line comment in HTML
- YAML compared to XML
- Details of difference between @see and @inheritDoc
- Multi-Line Comments in Ruby?
- How to change “Leave a Reply” title in wordpress twentyfifteen theme
- Where can I find the “Leave a Reply” line in the WordPress SmartBiz.1.1.1 theme?
- Show comments on WordPress home page
- Why do I get comment spam even with Akismet and Captcha?
- Is there ANY way to remove comments function and section totally?
- What tools are available for managing/writing to WordPress? [closed]
- How to rearrange fields in comment_form()
- setting comments off as default for pages and custom post types?
- how to reduce the number of spam comments
- Is it possible to pull comments from facebook into your blog?
- Find out which moderator approved comment?
- Filtering the Admin Comments List to Show Only Comments from the Current User?
- How to export comments in WordPress?
- Non-threaded comment replies with link to original comment
- How to make comments work for a post loaded per Ajax?
- Approve comment hook?
- Commenting in user profile page?
- How to change “You must be logged in to post a comment.”
- How to get comments by post ID?
- What are the package and subpackage comment for?
- comment_post_ID 0 (cannot remove from dashboard)
- Why are the comments disabled by default on my custom_post_types?
- Disable comments on all posts/pages
- How do I delete all comments from a specific old blog post?
- Change HTML Produced by wp_list_comments()
- Removing the “Website” Field from Comments and Replies?
- Stop WordPress redirecting comment-page-1 to the post page?
- Is it possible to filter comments in a post so a user can only see the comments they have written?
- Why are comments and trackbacks still getting through for custom post types?
- Importing old Disqus comments into WordPress
- How to add a class to the comment submit button?
- How to wrap submit button of comment form with div
- WP_Comment_Query pagination, delving into the unknown
- How to enable comments for pending and draft posts?
- Using WordPress’ WYSIWYG for comments
- Enable Submit Comment Without Page Reload (Using Ajax)?
- What for is the table “wp_commentmeta” exactly?
- Comment Walker vs. Comment Callback
- Experiences with adding Nonces to the comment form
- Getting Post Comments for post ID using WP_Query() and a Custom Loop?
- Add option to disable comments on a per posts basis?
- Resetting comment count
- How to remove comment section from page only , not from posts pages?
- Is there a plugin for posting inline comments, like in MS Word? [closed]
- When importing – failed to import: Invalid post type feedback
- How to change the email notification recipient (user) for new comments?
- How to limit users to one comment per post
- Redirect user to a custom url after submitting the comment
- Paginate result set from $wpdb->get_results()
- Style reply form different than comment form
- Change Comment Author Display Name
- Aggregate comments, with pagination
- Would switching to InnoDB from MyISAM improve performance of comments table?
- Custom comment type based on thread level
- How to add internal, revision comments to page updates
- Allow variable amount of comments before pagination
- How to load and show comments with AJAX instead of pagination?
- Linking to Page Showing Only Comments Without Parent Post
- Comment Reply javascript
- How do we remove the H3 tag for the reply-title I.D
- Comments not appearing at all