Add link for "Uri" objects
Message Registry File resources contain a "Uri" pointing to the
location of the Message Registry. This change makes the "Uri"
object a link that can be clicked to jump to the Message Registry.
Tested:
Verified that the "Uri" field is a link and takes you to the
Message Registry.
Change-Id: I33a443cffa7ed2f4c92f4a572d7186ef45be17f3
Signed-off-by: Jason M. Bills <jason.m.bills@linux.intel.com>
diff --git a/crow/include/crow/utility.h b/crow/include/crow/utility.h
index 63d2dec..b402b79 100644
--- a/crow/include/crow/utility.h
+++ b/crow/include/crow/utility.h
@@ -709,6 +709,10 @@
"("Members@odata\\.((nextLink))"[ \\n]*:[ "
"\\n]*)("((?!").*)")"};
s = std::regex_replace(s, nextLink, "$1<a href=\"$5\">$4</a>");
+
+ const static std::regex uri{"("((Uri))"[ \\n]*:[ "
+ "\\n]*)("((?!").*)")"};
+ s = std::regex_replace(s, uri, "$1<a href=\"$5\">$4</a>");
}
/**