diff --git a/docs/source/api/environment.rst b/docs/source/api/environment.rst index 110cc1dd..ae4cb2a9 100644 --- a/docs/source/api/environment.rst +++ b/docs/source/api/environment.rst @@ -25,4 +25,4 @@ members The ones from table are used here (of particular note is the ability to use ``sol::environment(my_lua_state, sol::create);`` to make a fresh, unnamed environment), plus the one unique constructor shown above. It is generally used as ``sol::environmeny my_env(my_lua_state, sol::create, my_fallback_table);``. The fallback table serves as the backup to lookup attempts on the environment table being created. It is achieved by simply creating a metatable for the ``sol::environment`` being created, and then doing ``env_metatable["__index"] = fallback;``. You can achieve fancier effects by changing the metatable of the environment to your liking, by creating it in some fashion and then setting the metatable explicitly and populating it with data, particularly with :doc:`sol::metatable_key`. -.. an example demonstrating the above and more: +.. _an example demonstrating the above and more: https://github.com/ThePhD/sol2/blob/develop/examples/environments.cpp