Skip to content

Commit ef76446

Browse files
authored
[skip ci] Fix ReadMe.md markdown style issues
1 parent e1e6003 commit ef76446

File tree

1 file changed

+87
-87
lines changed

1 file changed

+87
-87
lines changed

README.md

Lines changed: 87 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,27 @@
77
[![Build Status](https://travis-ci.org/jinja2cpp/Jinja2Cpp.svg?branch=master)](https://travis-ci.org/jinja2cpp/Jinja2Cpp)
88
[![Build status](https://ci.appveyor.com/api/projects/status/vu59lw4r67n8jdxl/branch/master?svg=true)](https://ci.appveyor.com/project/flexferrum/jinja2cpp-n5hjm/branch/master)
99
[![Coverage Status](https://codecov.io/gh/flexferrum/Jinja2Cpp/branch/master/graph/badge.svg)](https://codecov.io/gh/flexferrum/Jinja2Cpp)
10-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/d932d23e9288404ba44a1f500ab42778)](https://www.codacy.com/app/flexferrum/Jinja2Cpp?utm_source=github.com&utm_medium=referral&utm_content=flexferrum/Jinja2Cpp&utm_campaign=Badge_Grade)
10+
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/ff01fa4410ac417f8192dce78e919ece)](https://www.codacy.com/app/flexferrum/Jinja2Cpp_2?utm_source=github.com&utm_medium=referral&utm_content=jinja2cpp/Jinja2Cpp&utm_campaign=Badge_Grade)
1111
[![Github Releases](https://img.shields.io/github/release/jinja2cpp/Jinja2Cpp/all.svg)](https://github.com/flexferrum/Jinja2Cpp/releases)
1212
[![Github Issues](https://img.shields.io/github/issues/jinja2cpp/Jinja2Cpp.svg)](http://github.com/jinja2cpp/Jinja2Cpp/issues)
1313
[![GitHub License](https://img.shields.io/badge/license-Mozilla-blue.svg)](https://raw.githubusercontent.com/jinja2cpp/Jinja2Cpp/master/LICENSE)
14-
[ ![conan.io](https://api.bintray.com/packages/manu343726/conan-packages/jinja2cpp%3AManu343726/images/download.svg) ](https://bintray.com/manu343726/conan-packages/jinja2cpp%3AManu343726/_latestVersion)
14+
[![conan.io](https://api.bintray.com/packages/manu343726/conan-packages/jinja2cpp%3AManu343726/images/download.svg) ](https://bintray.com/manu343726/conan-packages/jinja2cpp%3AManu343726/_latestVersion)
1515
[![Gitter Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Jinja2Cpp/Lobby)
1616

17-
C++ implementation of big subset of Jinja2 template engine features. This library was inspired by [Jinja2CppLight](https://github.com/hughperkins/Jinja2CppLight) project and brings support of mostly all Jinja2 templates features into C++ world.
17+
C++ implementation of Jinja2 Python template engine. This library was originally inspired by [Jinja2CppLight](https://github.com/hughperkins/Jinja2CppLight) project and brings support of mostly all Jinja2 templates features into C++ world.
1818

19-
# Introduction
19+
## Introduction
2020

21-
Main features of Jinja2Cpp:
22-
- Easy-to-use public interface. Just load templates and render them.
23-
- Conformance to [Jinja2 specification](http://jinja.pocoo.org/docs/2.10/)
24-
- Partial support for both narrow- and wide-character strings both for templates and parameters.
25-
- Built-in reflection for C++ types.
26-
- Powerful full-featured Jinja2 expressions with filtering (via '|' operator) and 'if'-expressions.
27-
- Control statements (set, for, if).
28-
- Templates extention.
29-
- Macros
30-
- Rich error reporting.
21+
Main features of Jinja2C++:
22+
- Easy-to-use public interface. Just load templates and render them.
23+
- Conformance to [Jinja2 specification](http://jinja.pocoo.org/docs/2.10/)
24+
- Partial support for both narrow- and wide-character strings both for templates and parameters.
25+
- Built-in reflection for C++ types.
26+
- Powerful full-featured Jinja2 expressions with filtering (via '|' operator) and 'if'-expressions.
27+
- Control statements (set, for, if).
28+
- Templates extention.
29+
- Macros
30+
- Rich error reporting.
3131

3232
For instance, this simple code:
3333

@@ -56,27 +56,27 @@ Hello; world!!!
5656
hello; world!!!
5757
```
5858

59-
# Getting started
59+
## Getting started
6060

6161
In order to use Jinja2Cpp in your project you have to:
6262
* Clone the Jinja2Cpp repository
6363
* Build it according with the instructions
6464
* Link to your project.
6565

6666
Usage of Jinja2Cpp in the code is pretty simple:
67-
1. Declare the jinja2::Template object:
67+
1. Declare the jinja2::Template object:
6868

6969
```c++
7070
jinja2::Template tpl;
7171
```
7272

73-
2. Populate it with template:
73+
2. Populate it with template:
7474

7575
```c++
7676
tpl.Load("{{'Hello World' }}!!!");
7777
```
7878

79-
3. Render the template:
79+
3. Render the template:
8080

8181
```c++
8282
std::cout << tpl.RenderAsString(jinja2::ValuesMap{}) << std::endl;
@@ -90,58 +90,58 @@ Hello World!!!
9090

9191
That's all!
9292

93-
More detailed examples and features describtion can be found in the documentation: https://jinja2cpp.dev/docs/usage
93+
More detailed examples and features describtion can be found in the documentation: [https://jinja2cpp.dev/docs/usage](https://jinja2cpp.dev/docs/usage)
9494

95-
# Current Jinja2 support
95+
## Current Jinja2 support
9696
Currently, Jinja2Cpp supports the limited number of Jinja2 features. By the way, Jinja2Cpp is planned to be full [jinja2 specification](http://jinja.pocoo.org/docs/2.10/templates/)-conformant. The current support is limited to:
97-
- expressions. You can use almost every style of expressions: simple, filtered, conditional, and so on.
98-
- big number of filters (**sort, default, first, last, length, max, min, reverse, unique, sum, attr, map, reject, rejectattr, select, selectattr, pprint, dictsort, abs, float, int, list, round, random, trim, title, upper, wordcount, replace, truncate, groupby, urlencode**)
99-
- big number of testers (**eq, defined, ge, gt, iterable, le, lt, mapping, ne, number, sequence, string, undefined, in, even, odd, lower, upper**)
100-
- limited number of functions (**range**, **loop.cycle**)
101-
- 'if' statement (with 'elif' and 'else' branches)
102-
- 'for' statement (with 'else' branch and 'if' part support)
103-
- 'extends' statement
104-
- 'set' statement
105-
- 'extends'/'block' statements
106-
- 'macro'/'call' statements
107-
- recursive loops
108-
- space control
109-
110-
# Supported compilers
97+
- expressions. You can use almost every style of expressions: simple, filtered, conditional, and so on.
98+
- big number of filters (**sort, default, first, last, length, max, min, reverse, unique, sum, attr, map, reject, rejectattr, select, selectattr, pprint, dictsort, abs, float, int, list, round, random, trim, title, upper, wordcount, replace, truncate, groupby, urlencode**)
99+
- big number of testers (**eq, defined, ge, gt, iterable, le, lt, mapping, ne, number, sequence, string, undefined, in, even, odd, lower, upper**)
100+
- limited number of functions (**range**, **loop.cycle**)
101+
- 'if' statement (with 'elif' and 'else' branches)
102+
- 'for' statement (with 'else' branch and 'if' part support)
103+
- 'extends' statement
104+
- 'set' statement
105+
- 'extends'/'block' statements
106+
- 'macro'/'call' statements
107+
- recursive loops
108+
- space control
109+
110+
## Supported compilers
111111
Compilation of Jinja2Cpp tested on the following compilers (with C++14 enabled feature):
112-
- Linux gcc 5.0
113-
- Linux gcc 6.0
114-
- Linux gcc 7.0
115-
- Linux clang 5.0
116-
- Microsoft Visual Studio 2015 x86, x64
117-
- Microsoft Visual Studio 2017 x86, x64
118-
119-
# Build and install
112+
- Linux gcc 5.0
113+
- Linux gcc 6.0
114+
- Linux gcc 7.0
115+
- Linux clang 5.0
116+
- Microsoft Visual Studio 2015 x86, x64
117+
- Microsoft Visual Studio 2017 x86, x64
118+
119+
## Build and install
120120
Jinja2Cpp has several external dependencies:
121-
* `boost` library (at least version 1.55)
122-
* `nonstd::expected-lite` (https://github.com/martinmoene/expected-lite)
123-
* `nonstd::variant-lite` (https://github.com/martinmoene/variant-lite)
124-
* `nonstd::value-ptr-lite` (https://github.com/martinmoene/value-ptr-lite)
125-
* `nonstd::optional-lite`(https://github.com/martinmoene/optional-lite)
121+
- `boost` library (at least version 1.55)
122+
- `nonstd::expected-lite` [https://github.com/martinmoene/expected-lite](https://github.com/martinmoene/expected-lite)
123+
- `nonstd::variant-lite` [https://github.com/martinmoene/variant-lite](https://github.com/martinmoene/variant-lite)
124+
- `nonstd::value-ptr-lite` [https://github.com/martinmoene/value-ptr-lite](https://github.com/martinmoene/value-ptr-lite)
125+
- `nonstd::optional-lite` [https://github.com/martinmoene/optional-lite](https://github.com/martinmoene/optional-lite)
126126

127127
In simpliest case to compile Jinja2Cpp you need:
128128

129-
1. Install CMake build system (at least version 3.0)
130-
2. Clone jinja2cpp repository and update submodules:
129+
1. Install CMake build system (at least version 3.0)
130+
2. Clone jinja2cpp repository and update submodules:
131131

132132
```
133133
> git clone https://github.com/flexferrum/Jinja2Cpp.git
134134
> git submodule -q update --init
135135
```
136136

137-
3. Create build directory:
137+
3. Create build directory:
138138

139139
```
140140
> cd Jinja2Cpp
141141
> mkdir build
142142
```
143143

144-
4. Run CMake and build the library:
144+
4. Run CMake and build the library:
145145

146146
```
147147
> cd build
@@ -164,7 +164,7 @@ In simpliest case to compile Jinja2Cpp you need:
164164

165165
In this case Jinja2Cpp will be built with internally-shipped dependencies and install them respectively. But Jinja2Cpp supports build with externally-provided deps. Different Jinja2Cpp usage scenarios can be found in this repository: https://github.com/jinja2cpp/examples-build
166166

167-
## Usage with conan.io dependency manager
167+
### Usage with conan.io dependency manager
168168
Jinja2Cpp can be used as conan.io package. In this case you should do the following steps:
169169

170170
1. Install conan.io according to the documentation ( https://docs.conan.io/en/latest/installation.html )
@@ -205,48 +205,48 @@ set_target_properties (${TARGET_NAME} PROPERTIES
205205
```
206206

207207

208-
## Additional CMake build flags
208+
### Additional CMake build flags
209209
You can define (via -D command line CMake option) the following build flags:
210210

211-
* **JINJA2CPP_BUILD_TESTS** (default TRUE) - to build or not to Jinja2Cpp tests.
212-
* **JINJA2CPP_STRICT_WARNINGS** (default TRUE) - Enable strict mode compile-warnings(-Wall -Werror and etc).
213-
* **JINJA2CPP_BUILD_SHARED** (default OFF) - Specify Jinja2Cpp library library link type.
214-
* **MSVC_RUNTIME_TYPE** (default /MD) - MSVC runtime type to link with (if you use Microsoft Visual Studio compiler).
215-
* **JINJA2CPP_DEPS_MODE** (default "internal") - modes for dependencies handling. Following values possible:
216-
* `internal` In this mode Jinja2Cpp build script uses dependencies (include `boost`) shipped as subprojects. Nothing needs to be provided externally.
217-
* `external-boost` In this mode Jinja2Cpp build script uses only `boost` as externally-provided dependency. All other dependencies taken from subprojects.
218-
* `external` In this mode all dependencies should be provided externally. Paths to `boost`, `nonstd-*` libs etc. should be specified via standard CMake variables (like `CMAKE_PREFIX_PATH` or libname_DIR)
219-
* `conan-build` Special mode for building Jinja2Cpp via conan recipe.
211+
- **JINJA2CPP_BUILD_TESTS** (default TRUE) - to build or not to Jinja2Cpp tests.
212+
- **JINJA2CPP_STRICT_WARNINGS** (default TRUE) - Enable strict mode compile-warnings(-Wall -Werror and etc).
213+
- **JINJA2CPP_BUILD_SHARED** (default OFF) - Specify Jinja2Cpp library library link type.
214+
- **MSVC_RUNTIME_TYPE** (default /MD) - MSVC runtime type to link with (if you use Microsoft Visual Studio compiler).
215+
- **JINJA2CPP_DEPS_MODE** (default "internal") - modes for dependencies handling. Following values possible:
216+
- `internal` In this mode Jinja2Cpp build script uses dependencies (include `boost`) shipped as subprojects. Nothing needs to be provided externally.
217+
- `external-boost` In this mode Jinja2Cpp build script uses only `boost` as externally-provided dependency. All other dependencies taken from subprojects.
218+
- `external` In this mode all dependencies should be provided externally. Paths to `boost`, `nonstd-*` libs etc. should be specified via standard CMake variables (like `CMAKE_PREFIX_PATH` or libname_DIR)
219+
- `conan-build` Special mode for building Jinja2Cpp via conan recipe.
220220

221221

222-
## Build with C++17 standard enabled
222+
### Build with C++17 standard enabled
223223
In case of C++17 standard enabled for your project you should define `variant_CONFIG_SELECT_VARIANT=variant_VARIANT_NONSTD` macro in the build settings.
224224

225-
# Acknowledgments
225+
## Acknowledgments
226226
Thanks to @manu343726 for CMake scripts improvement, bugs hunting and fixing and conan.io packaging.
227227

228228
Thanks to @martinmoene for perfectly implemented xxx-lite libraries.
229229

230-
# Changelog
231-
## Version 0.9.1
232-
* `applymacro` filter added which allows to apply arbitrary macro as a filter
233-
* dependencies to boost removed from the public interface
234-
* CMake scripts improved
235-
* Various bugs fixed
236-
* Improve reflection
237-
* Warnings cleanup
238-
239-
## Version 0.9
240-
* Support of 'extents'/'block' statements
241-
* Support of 'macro'/'call' statements
242-
* Rich error reporting
243-
* Support for recursive loops
244-
* Support for space control before and after control blocks
245-
* Improve reflection
246-
247-
## Version 0.6
248-
* A lot of filters has been implemented. Full set of supported filters listed here: https://github.com/flexferrum/Jinja2Cpp/issues/7
249-
* A lot of testers has been implemented. Full set of supported testers listed here: https://github.com/flexferrum/Jinja2Cpp/issues/8
250-
* 'Contatenate as string' operator ('~') has been implemented
251-
* For-loop with 'if' condition has been implemented
252-
* Fixed some bugs in parser
230+
## Changelog
231+
### Version 0.9.1
232+
- `applymacro` filter added which allows to apply arbitrary macro as a filter
233+
- dependencies to boost removed from the public interface
234+
- CMake scripts improved
235+
- Various bugs fixed
236+
- Improve reflection
237+
- Warnings cleanup
238+
239+
### Version 0.9
240+
- Support of 'extents'/'block' statements
241+
- Support of 'macro'/'call' statements
242+
- Rich error reporting
243+
- Support for recursive loops
244+
- Support for space control before and after control blocks
245+
- Improve reflection
246+
247+
### Version 0.6
248+
- A lot of filters has been implemented. Full set of supported filters listed here: [https://github.com/flexferrum/Jinja2Cpp/issues/7](https://github.com/flexferrum/Jinja2Cpp/issues/7)
249+
- A lot of testers has been implemented. Full set of supported testers listed here: [https://github.com/flexferrum/Jinja2Cpp/issues/8](https://github.com/flexferrum/Jinja2Cpp/issues/8)
250+
- 'Contatenate as string' operator ('~') has been implemented
251+
- For-loop with 'if' condition has been implemented
252+
- Fixed some bugs in parser

0 commit comments

Comments
 (0)