Commit graph

11 commits

Author SHA1 Message Date
Jacob 71ceaa517c Simplify HTML::Properties class 2024-06-17 21:08:50 +02:00
Jacob 14cd8c4122 Remove/replace some "C with classes" junk. The C++ core guidelines state
that you must not use ALL_CAPS for enum members. enum class is now used
as well, to further reinforce the idea that this is a C++ library. While
neither of these changes are necessary, it leads to a better and more
intuitive API design.

More operator overloading has also been added for many of the classes,
particularly the [] index operator, which can now be used in place of
the at() method. More methods have also been added, particularly for
Section and Document.

Some methods have also been fixed, or have had their behavior altered
slightly, but this should now be covered under the new tests, which have
also been (for the most part) rewritten, both because they were
previously both primitive and rather ugly and because new functionality
was added.

Examples have also been updated to reflect the changes made in this
commit, so that they build successfully.

Of course, these changes mean that the new API is incompatible with any
applications written with the 0.0.1 version. Hopefully most of these
changes are dealt with before the 1.0 release, because I would prefer
not making API-breaking changes by that point.
2024-05-20 01:32:49 +02:00
Jacob a5bbb64250 Add speedie-page example. 2024-05-17 14:14:24 +02:00
Jacob d7107de41b Add HTML tag enum 2024-05-15 10:22:22 +02:00
Jacob ee0720cd67 Change case for many methods to closer align with the standard library. 2024-05-13 12:00:47 +02:00
Jacob 8ba0aff55c Revise examples a little bit. 2024-05-13 00:57:27 +02:00
Jacob 35a15651ca Rename the different classes. I felt it was too verbose. 2024-05-12 20:18:06 +02:00
Jacob 8f3ba89445 Implement iterators for several classes and rename HTMLElementProperties
to HTMLProperties.
2024-05-12 20:05:23 +02:00
Jacob 43daa77f6d Implement support for plain text elements and sections without a tag.
Also, add example replica of biteme.lol.
2024-05-07 21:21:58 +02:00
Jacob 21ddd1d82c Change the behavior of FORMATTING_PRETTY to include tabs.
FORMATTING_NEWLINE can be used if you want to preserve the old behavior.
2024-05-07 17:26:11 +02:00
Jacob 0641a95770 Initial commit 2024-05-05 23:31:42 +02:00