Skip to content

Commit

Permalink
Make sure YAML is valid for view command. (Alexey Zakhlestin #5)
Browse files Browse the repository at this point in the history
  • Loading branch information
trans committed Dec 19, 2012
1 parent a4fd878 commit a018053
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# RELEASE HISTORY

## 0.1.1 /

Changes:

* Make sure it is valid YAML. (Alexey Zakhlestin)


## 0.1.0 / 2012-12-12

The project has been renamed `yaml-command` instead of the
Expand Down
7 changes: 6 additions & 1 deletion lib/yaml_command/view.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
module YAMLCommand

# TODO: View could use a better implmentation, it is very simplistic
# TODO: View could use a better implementation, it is very simplistic
# at this point.

# TODO: Color coordinate matching achors and references.

# TODO: Should view make a YAML stream if given multiple files ?


Expand Down Expand Up @@ -30,6 +32,9 @@ def call(path=nil)
end
end

# Make sure it is valid YAML.
YAML.load(text)

text.each_line do |line|
case line
when /^---/
Expand Down

0 comments on commit a018053

Please sign in to comment.