2 new revisions:

Revision: 59df13895c6f
Author:   Pekka Klärck
Date:     Sat Jun 18 17:24:03 2011
Log:      executable
http://code.google.com/p/robotframework/source/detail?r=59df13895c6f

Revision: 4b89a95dce35
Author:   Pekka Klärck
Date:     Sat Jun 18 17:28:41 2011
Log:      Format docs and metadata as html.
http://code.google.com/p/robotframework/source/detail?r=4b89a95dce35

==============================================================================
Revision: 59df13895c6f
Author:   Pekka Klärck
Date:     Sat Jun 18 17:24:03 2011
Log:      executable
http://code.google.com/p/robotframework/source/detail?r=59df13895c6f

Modified:
 /src/robot/webcontent/testdata/create_jsdata.py

=======================================
--- /src/robot/webcontent/testdata/create_jsdata.py     Fri Jun 17 00:40:10 2011
+++ /src/robot/webcontent/testdata/create_jsdata.py     Sat Jun 18 17:24:03 2011
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
 import os
 import robot
 from robot.result.jsparser import create_datamodel_from

==============================================================================
Revision: 4b89a95dce35
Author:   Pekka Klärck
Date:     Sat Jun 18 17:28:41 2011
Log:      Format docs and metadata as html.
http://code.google.com/p/robotframework/source/detail?r=4b89a95dce35

Modified:
 /src/robot/result/elementhandlers.py
 /src/robot/webcontent/testdata/dir.suite/__init__.txt

=======================================
--- /src/robot/result/elementhandlers.py        Fri Jun 17 01:30:20 2011
+++ /src/robot/result/elementhandlers.py        Sat Jun 18 17:28:41 2011
@@ -30,7 +30,7 @@
             'statistics' : _StatisticsHandler,
             'stat'       : _StatItemHandler,
             'errors'     : _Handler,
-            'doc'        : _TextHandler,
+            'doc'        : _HtmlTextHandler,
             'kw'         : _KeywordHandler,
             'arg'        : _ArgumentHandler,
             'arguments'  : _ArgumentsHandler,
@@ -51,6 +51,9 @@
     def end_element(self, text):
         return self._data_from_children

+    def _html_format(self, text):
+        return utils.html_escape(text, formatting=True)
+

 class RootHandler(_Handler):
     # TODO: Combine _RootHandler and _RobotHandler
@@ -151,6 +154,7 @@


 class _StatusHandler(object):
+
     def __init__(self, context, attrs):
         self._context = context
         self._status = attrs.get('status')[0]
@@ -191,6 +195,12 @@
         return self._context.get_text_id(text)


+class _HtmlTextHandler(_Handler):
+
+    def end_element(self, text):
+        return self._context.get_text_id(self._html_format(text))
+
+
 class _MetadataHandler(_Handler):

     def __init__(self, context, attrs):
@@ -211,7 +221,7 @@
         self._name = attrs.get('name')

     def end_element(self, text):
-        return [self._name, self._context.get_text_id(text)]
+ return [self._name, self._context.get_text_id(self._html_format(text))]


 class _MsgHandler(_Handler):
=======================================
--- /src/robot/webcontent/testdata/dir.suite/__init__.txt Fri Jun 17 00:40:10 2011 +++ /src/robot/webcontent/testdata/dir.suite/__init__.txt Sat Jun 18 17:28:41 2011
@@ -1,3 +1,8 @@
 *** Settings ***
-Suite Setup   Log  higher level suite setup
-Force Tags    i1   i2
+Documentation  *URL:*    http://robotframework.org\n
+... _Image:_ http://code.google.com/p/robotframework/logo?ext.png
+Metadata       URL       http://robotframework.org
+Metadata Image http://code.google.com/p/robotframework/logo?ext.png
+Metadata       Formatting  *Bold* and _italics_
+Suite Setup    Log  higher level suite setup
+Force Tags     i1  i2

Reply via email to