[yocto] [layerindex-web][PATCH 3/6] Show layer description with newlines in layer detail

Paul Eggleton paul.eggleton at linux.intel.com
Mon Feb 19 19:45:55 PST 2018


A lot of people enter line breaks in their layer descriptions hoping
that these will show up in the layer description, but of course since
they are being displayed as part of an HTML document, they don't by
default. Use a style in the description paragraph to ensure that they
do.

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
 templates/layerindex/detail.html | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/templates/layerindex/detail.html b/templates/layerindex/detail.html
index 0747421..3081ef3 100644
--- a/templates/layerindex/detail.html
+++ b/templates/layerindex/detail.html
@@ -76,9 +76,7 @@
 
             <div class="row-fluid">
                 <div class="description span7">
-                    <p>
-                       {{ layeritem.description }}
-                    </p>
+                    <p style="white-space: pre">{{ layeritem.description }}</p>
                     <p>
                         {% if layeritem.usage_url %}
                             <span class="label label-info">
-- 
2.14.3




More information about the yocto mailing list