Format all code examples

parent 60848023
...@@ -20,11 +20,11 @@ To simplify strings, the %-encoding has been removed. If you need non-printable ...@@ -20,11 +20,11 @@ To simplify strings, the %-encoding has been removed. If you need non-printable
``log`` moved to the std vmod ``log`` moved to the std vmod
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
``log`` has moved to the std vmod: ``log`` has moved to the std vmod::
log "log something"; log "log something";
becomes becomes::
import std; import std;
std.log("log something"); std.log("log something");
...@@ -34,11 +34,11 @@ You only need to import std once. ...@@ -34,11 +34,11 @@ You only need to import std once.
purges are now called bans purges are now called bans
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
``purge()`` and ``purge_url()`` are now respectively ``ban()`` and ``ban_url()``, so you should replace all occurences: ``purge()`` and ``purge_url()`` are now respectively ``ban()`` and ``ban_url()``, so you should replace all occurences::
purge("req.url = " req.url); purge("req.url = " req.url);
becomes becomes::
ban("req.url = " + req.url); ban("req.url = " + req.url);
...@@ -84,22 +84,22 @@ becomes:: ...@@ -84,22 +84,22 @@ becomes::
``req.hash`` is replaced with ``hash_data()`` ``req.hash`` is replaced with ``hash_data()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You no longer append to the hash with ``+=``, so You no longer append to the hash with ``+=``, so::
set req.hash += req.url; set req.hash += req.url;
becomes becomes::
hash_data(req.url); hash_data(req.url);
``esi`` is replaced with ``beresp.do_esi`` ``esi`` is replaced with ``beresp.do_esi``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You no longer enable ESI with ``esi``, so You no longer enable ESI with ``esi``, so::
esi; esi;
in ``vcl_fetch`` becomes in ``vcl_fetch`` becomes::
set beresp.do_esi = true; set beresp.do_esi = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment