schovi / baked_file_system

Virtual File System for Crystal language. Embedding your assets into final binary.
MIT License
177 stars 18 forks source link

escape `#` in encoder so `#{` can't happen in resulting string #14

Closed repomaa closed 6 years ago

straight-shoota commented 6 years ago

Would you mind also adding a spec for BakedFileSystem::Loader::Encoder like this?

describe "Loader::Encoder" do
  it "escapes string interpolation" do
    String.build do |str|
      Encoder.new(str) << "foo\#{bar}"
    end.should eq "foo\\\#{bar} "
  end
end
straight-shoota commented 6 years ago

@jreinert Are you still up for this?

straight-shoota commented 6 years ago

This was superseeded by #15 Thanks @jreinert for setting the basis for that!