CTML Versions Save

A C++ HTML document constructor only depending on the standard library.

2.0.0

3 years ago

Selectors!

I had the functionality for selector parsing in the library for a couple of months but it only was ever used for element construction. I had been meaning to implement selector search for awhile but hadn't been able to find the time. Though, now is that time. You can now search for elements using their selector with the new CTML::Node::QuerySelector(const std::string&) method. This method reflects how querySelectorAll works in JavaScript on a browser, and tries to be a faithful recreation of that.

I also added the ability to construct multiple elements with the selector construction method. For instance if you use the following code:

CTML::Node node("div#first section#second article#third");

This will create a document like the following:

<div id="first">
    <section id="second">
        <article id="third">
        </article>
    </section>
</div>

Enjoy the new selector functionality! Keep in mind that there may be some breaking changes with this release.

1.1.1

4 years ago

I removed std::string_view and moved back down to C++11 for this release as I realized that C++17 as it is still fairly new. I don't wish to lock people out of using this library if their compiler doesn't support it.

I also had to change the CTML::ToStringOptions struct to use a constructor rather than allowing the use of an initializer list, as it seemed to lead to errors.

1.1.0

4 years ago

This release changes the usage of ToString methods on both Document and Node to using a ToStringOptions structure for the parameter rather than a mess of parameters. This way, if more options are added to the method, they can be changed out and added without having to worry about your code breaking.

In non-user facing changes, I changed the CMake C++ compile version to C++17 so that I could use std::string_view for non-copying strings rather than a const std::string&. If this could cause a problem for you using the library, let me know and I could try and find an easy fix.

1.0.1

5 years ago

Added methods for removing children from a Node, and made a few code style changes.

1.0.0

5 years ago

A cleanup/rewrite of CTML that makes the code more readable and easier to contribute to later.

From the previous versions, most is largely the same, aside from the ToTree methods being removed for lack of usefulness, as well as the CTML::Document::WriteToFile method being removed, as you can write to a file using your own methods with the output of CTML::Document::ToString.

This release also introduces better test code (courteous of Catch2 and a CMake project for ease of building and including.