You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
368 B

3 months ago
  1. #include "directives.h"
  2. namespace YAML {
  3. Directives::Directives() : version{true, 1, 2}, tags{} {}
  4. std::string Directives::TranslateTagHandle(
  5. const std::string& handle) const {
  6. auto it = tags.find(handle);
  7. if (it == tags.end()) {
  8. if (handle == "!!")
  9. return "tag:yaml.org,2002:";
  10. return handle;
  11. }
  12. return it->second;
  13. }
  14. } // namespace YAML