Ticket #852: tweak-whitespace-doc.patch

File tweak-whitespace-doc.patch, 2.0 KB (added by berkerpeksag, 11 years ago)
  • mediagoblin/plugins/trim_whitespace/README.rst

    From 35a3b0bf224c50bcb29e456dc9dc29999300496d Mon Sep 17 00:00:00 2001
    From: Berker Peksag <berker.peksag@gmail.com>
    Date: Fri, 21 Feb 2014 10:20:03 +0200
    Subject: [PATCH] Tweak the trim whitespace plugin documentation.
    
    - Fix code highlighting
    - Wrap all lines to 80 chars
    - Add more markup (eg. Response() to ``Response()``)
    ---
     mediagoblin/plugins/trim_whitespace/README.rst |   15 ++++++++++-----
     1 files changed, 10 insertions(+), 5 deletions(-)
    
    diff --git a/mediagoblin/plugins/trim_whitespace/README.rst b/mediagoblin/plugins/trim_whitespace/README.rst
    index b55ce35..db9a0c5 100644
    a b  
    33=======================
    44
    55Mediagoblin templates are written with 80 char limit for better
    6 readability. However that means that the html output is very verbose
    7 containing LOTS of whitespace. This plugin inserts a Middleware that
    8 filters out whitespace from the returned HTML in the Response() objects.
     6readability. However that means that the HTML output is very verbose
     7containing *lots* of whitespace. This plugin inserts a middleware that
     8filters out whitespace from the returned HTML in the ``Response()``
     9objects.
    910
    10 Simply enable this plugin by putting it somewhere where python can reach it and put it's path into the [plugins] section of your mediagoblin.ini or mediagoblin_local.ini like for example this:
     11Simply enable this plugin by putting it somewhere where Python can reach
     12it and put it's path into the ``[plugins]`` section of your
     13``mediagoblin.ini`` or ``mediagoblin_local.ini`` like for example this:
     14
     15.. code-block:: ini
    1116
    1217    [plugins]
    1318    [[mediagoblin.plugins.trim_whitespace]]
    1419
    1520There is no further configuration required. If this plugin is enabled,
    16 all text/html documents should not have lots of whitespace in between
     21all *text/html* documents should not have lots of whitespace in between
    1722elements, although it does a very naive filtering right now (just keep
    1823the first whitespace and delete all subsequent ones).
    1924