#include "components/shared_highlighting/core/common/fragment_directives_utils.h"
#include <string.h>
#include <optional>
#include <sstream>
#include <string_view>
#include "base/json/json_writer.h"
#include "base/ranges/algorithm.h"
#include "base/strings/escape.h"
#include "base/strings/strcat.h"
#include "base/strings/string_split.h"
#include "base/strings/string_util.h"
#include "components/shared_highlighting/core/common/fragment_directives_constants.h"
#include "components/shared_highlighting/core/common/text_fragment.h"
namespace shared_highlighting {
base::Value ParseTextFragments(const GURL& url) { … }
bool SplitUrlTextFragmentDirective(const std::string& full_url,
GURL* webpage_url,
std::string* highlight_directive) { … }
std::vector<std::string> ExtractTextFragments(std::string ref_string) { … }
GURL RemoveFragmentSelectorDirectives(const GURL& url) { … }
GURL AppendFragmentDirectives(const GURL& base_url,
std::vector<TextFragment> fragments) { … }
GURL AppendSelectors(const GURL& base_url, std::vector<std::string> selectors) { … }
GURL AppendFragmentDirectives(const GURL& base_url,
std::vector<std::string> directives) { … }
}