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

Extract a method to represent keys in mappings #6

Closed
wants to merge 179 commits into from

Conversation

davidfraser
Copy link

We wanted to extend pyyaml so that we could make keys unquoted in our representation of config files. However, there's no easy way to do this without copying the whole represent_mapping method. This simple refactor makes it trivial to do in a subclass, without breaking any tests

Thanks Gustavo Rahal for reporting it.
 * In the flow context, indentation level is not checked.
 * For quoted scalars, indentation level is not checked.
 * Flow scalars are not required to have at least 1 space indentation. Zero indentation is acceptable.
 * Add parsing events: STREAM-START, DOCUMENT-START, DOCUMENT-END.
Usage:
{{{
$ cat your_yaml_document | ./yaml_hl.py                         # Produces colored ASCII output
$ cat your_yaml_document | ./yaml_hl.py -c yaml_hl_html.cfg     # Produces HTML output.
}}}
xitology and others added 24 commits February 23, 2009 19:17
… line width (Thanks ingy for the report and the patch).
@ingydotnet
Copy link
Member

This repo is now canonical but we had to force push master. @davidfraser can you rebase?

@davidfraser davidfraser changed the base branch from master to old/master September 8, 2016 15:54
@davidfraser davidfraser changed the base branch from old/master to master September 8, 2016 15:54
@davidfraser
Copy link
Author

Couldn't adjust this pull request, so reissued as #34

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants