Skip to content

Commit

Permalink
Fixup namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainCorlay committed Aug 31, 2020
1 parent f2df30e commit 721cb36
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/source/rich_display.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ This can be achieved by simply overloading the function

.. code::
nlohmann_json mime_bundle_repr(const foo&);
nl::json mime_bundle_repr(const foo&);
in the same namespace ``myns`` as ``foo``.

Expand All @@ -76,6 +76,8 @@ buffer to the frontend.
#include "xtl/xbase64.hpp"
#include "nlohmann/json.hpp"
namespace nl = nlohmann;
namespace im
{
struct image
Expand All @@ -89,9 +91,9 @@ buffer to the frontend.
std::stringstream m_buffer;
};
nlohmann::json mime_bundle_repr(const image& i)
nl::json mime_bundle_repr(const image& i)
{
auto bundle = nlohmann::json::object();
auto bundle = nl::json::object();
bundle["image/png"] = xtl::base64encode(i.m_buffer.str());
return bundle;
}
Expand Down

0 comments on commit 721cb36

Please sign in to comment.