Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ list(APPEND BT_SOURCE
src/script_parser.cpp
src/json_export.cpp
src/xml_parsing.cpp
src/xml_diff.cpp

src/actions/test_node.cpp
src/actions/sleep_node.cpp
Expand Down
26 changes: 26 additions & 0 deletions include/behaviortree_cpp/xml_diff.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma once

#include <string>
#include <string_view>

#include "behaviortree_cpp/exceptions.h"

namespace BT
{

enum class XMLDiffFormat
{
PlainText,
Markdown
};

/**
* @brief Render a structural review diff between two Behavior Tree XML documents.
*
* @throws RuntimeError if either document is malformed XML.
*/
[[nodiscard]] std::string RenderXMLDiff(std::string_view before_xml,
std::string_view after_xml,
XMLDiffFormat format = XMLDiffFormat::Markdown);

} // namespace BT
Loading
Loading