kainjow / Mustache

Mustache text templates for modern C++
Boost Software License 1.0
355 stars 49 forks source link

Add an overload to render() that accepts a context and a stream #21

Closed KitsuneRal closed 6 years ago

KitsuneRal commented 6 years ago

There's a two-argument render() overload for basic_data<>, making one for basic_context<> in the same way is pretty obvious.

codecov-io commented 6 years ago

Codecov Report

Merging #21 into master will increase coverage by 0.35%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
+ Coverage   99.21%   99.57%   +0.35%     
==========================================
  Files           2        2              
  Lines        1410     1404       -6     
==========================================
- Hits         1399     1398       -1     
+ Misses         11        6       -5
Impacted Files Coverage Δ
tests.cpp 99.28% <ø> (+0.57%) :arrow_up:
mustache.hpp 100% <100%> (ø) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9dce078...c71aa5c. Read the comment docs.

KitsuneRal commented 6 years ago

Peeking at how rendering to a stream is tested now, made a replica that accepts a context.

KitsuneRal commented 6 years ago

I took the liberty and rebased the PR on the latest master.

KitsuneRal commented 6 years ago

That's what happens when not running tests after rebasing... Fixed.