Commit graph

68 commits

Author SHA1 Message Date
Jacob 9d30189d31 Add Non_Opened to Type enum. It can be used if you want an element that
is only closed.
2024-05-25 21:48:13 +02:00
Jacob 2067aaace3 Remove inline qualifier from namespaces. 2024-05-23 20:07:12 +02:00
Jacob 8adb6575a1 Add tests for CSS, add some missing methods. 2024-05-21 20:06:04 +02:00
Jacob f416639461 Oops, wrong file name. 2024-05-20 01:53:34 +02:00
Jacob 65491ee2ac Add CONTRIBUTIONS.md file, with guidelines for contributors. 2024-05-20 01:52:01 +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 223f81dc90 Fix dist_release function call in Make script. 2024-05-17 23:54:24 +02:00
Jacob 29dea51b6b Changed my mind, disable Debug testing. 2024-05-17 23:07:47 +02:00
Jacob 95ac0d5057 Don't include .git* in the release tarballs. 2024-05-17 23:05:41 +02:00
Jacob 1da204e096 Cleanup cmake-multi-platform.yml 2024-05-17 23:02:35 +02:00
Jacob e178332f7a Add a comment for each enum member. 2024-05-17 15:06:16 +02:00
Jacob 3c7f1ef085 Change the description of the project to be more generalized. SGML-like
syntax should be supported.
2024-05-17 14:47:09 +02:00
Jacob a5bbb64250 Add speedie-page example. 2024-05-17 14:14:24 +02:00
Jacob 65dd704aff Implement ELEMENT_EMPTY_NO_FORMAT, which is an empty tag without
formatting.
2024-05-17 13:52:16 +02:00
Jacob 524058e779 Fix: Some template functions not having a default value. 2024-05-17 13:30:47 +02:00
Jacob e49535179e Move template functions to header. Rather silly mistake. 2024-05-17 13:02:26 +02:00
Jacob aabb1f79ea Add more test cases, fix a bug where tr is not in the map. 2024-05-17 12:23:01 +02:00
Jacob 8d3e23ac5a Use TYPE_TEXT_TAB instead for ELEMENT_EMPTY 2024-05-17 08:41:14 +02:00
Jacob df19d81555 Change properties for some tags. 2024-05-17 08:20:02 +02:00
Jacob 6fa9373f25 Remove const qualifier.
It doesn't do much useful, and it seems to cause Windows building to
fail.
2024-05-16 18:00:05 +02:00
Jacob 3449a39154 Some minor cleanup. I'm basically nitpicking at this point. 2024-05-16 10:59:59 +02:00
Jacob 3e7a63e282 Move another constructor to the header.
Also, don't mark Properties() constructors as explicit.
2024-05-16 10:51:42 +02:00
Jacob b206aa3ea7 Optimize template functions a little bit. 2024-05-16 08:20:57 +02:00
Jacob d6db5690b3 Optimize constructors by initializing variables rather than overriding the
values using the appropriate set() methods.
2024-05-16 08:09:27 +02:00
Jacob 6d7cb9af86 Add missing tag, resolve_tag now returns the proper closing tag as well,
for convenience.
2024-05-15 23:33:17 +02:00
Jacob 247b2cbf37 Add <link> tag, forgot about this one. 2024-05-15 22:48:33 +02:00
Jacob c4034adcea Replace case statement with a static const std::unordered_map. 2024-05-15 17:36:47 +02:00
Jacob fa107fcb64 Name the enums, and use them in the function declarations.
Old variant was a little bit too much "C with classes" for my taste.
2024-05-15 10:57:47 +02:00
Jacob d7107de41b Add HTML tag enum 2024-05-15 10:22:22 +02:00
Jacob 1458273912 Simplify testing. No need to use CMake testing module for this. 2024-05-14 20:33:05 +02:00
Jacob 93b5a57c35 Change the shell, for better compatibility. 2024-05-14 19:21:13 +02:00
Jacob f139028deb I don't know if it's so small anymore. 2024-05-14 15:46:43 +02:00
Jacob 8a3d21ea31 Add Gentoo ebuild, along with code necessary to generate one. Also,
clean up the CMakeLists.txt file, allowing it to be more cross platform.
2024-05-14 15:39:50 +02:00
Jacob ceda875213 Make use of the template functions in the test cases. 2024-05-14 10:04:32 +02:00
Jacob f30f1431fd Add Arch packaging.
TODO: Gentoo, Debian and Red Hat packaging.
2024-05-13 15:09:20 +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 e2568dd62d Add a docpp_make script, which creates a tarball release. 2024-05-13 02:46:21 +02:00
Jacob b38a427047 Remove compile_commands.json symlink.
I don't think it's necessary, most IDEs should be able to find it in the
build/ directory.
2024-05-13 02:13:53 +02:00
Jacob b44a934d20 Add docpp.pc file, allowing pkg-config to find docpp. 2024-05-13 02:00:40 +02:00
Jacob 8ba0aff55c Revise examples a little bit. 2024-05-13 00:57:27 +02:00
Jacob 27ff72f2a5 Add some more templates for methods that return std::string. 2024-05-13 00:45:04 +02:00
Jacob 8caa3d92eb Add template get() methods. Also, remove instances of the auto type. 2024-05-12 23:43:44 +02:00
Jacob 7fa001bcde Remove a method I accidentally declared. 2024-05-12 23:04:04 +02:00
Jacob 2f9c24e8ab Add Doxygen file, remove old aliases. 2024-05-12 21:56:03 +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 17d8bf6b4b Add front() and back() methods for the various classes. 2024-05-07 22:58:53 +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 804309d323 Implement operator overloading for several classes. 2024-05-07 00:08:54 +02:00