Revision: 2063
Author: pekka.klarck
Date: Mon Jul 27 13:31:06 2009
Log: Fixed unescaping resource file top-level documentation and added some test data that demonstrated the problem. This resolves issue 320.
http://code.google.com/p/robotframework/source/detail?r=2063

Modified:
 /trunk/tools/libdoc/libdoc.py
 /trunk/tools/libdoc/test/resource.tsv

=======================================
--- /trunk/tools/libdoc/libdoc.py       Tue May  5 03:19:59 2009
+++ /trunk/tools/libdoc/libdoc.py       Mon Jul 27 13:31:06 2009
@@ -262,7 +262,7 @@
         doc = getattr(resource, 'doc', '')  # doc available only in 2.1+
         if not doc:
             doc = "Documentation for resource file `%s`." % self.name
-        return doc
+        return utils.unescape(doc)

     def _get_initializers(self, lib):
         return []
=======================================
--- /trunk/tools/libdoc/test/resource.tsv       Fri Mar 20 04:38:56 2009
+++ /trunk/tools/libdoc/test/resource.tsv       Mon Jul 27 13:31:06 2009
@@ -1,6 +1,14 @@
 *setting*
 Documentation  This resource file has documentation.
-...    And it is even set in multiple cells.
+...    And it is even set in multiple cells with _formatting_.
+...    \n
+...    -------------\n
+...    \n
+...    | *TABLE* |\n
+...    | ${NONEX} | ${CURDIR} | ${TEMPDIR} |\n
+...    \n
+...    tabs \t\t\t here
+

 *keyword*
 kw     [Documentation] foo bar `kw 2`.
@@ -13,7 +21,7 @@
 kw 5   [ documentation ]       foo bar `kw`.\n baa `${a1}` alskdj alskdjlajd
        ...     askf laskdjf asldkfj alsdkfj alsdkfjasldkfj
        ...     askf laskdjf _asldkfj_ alsdkfj alsdkfjasldkfj
-       ...     askf *laskdjf* asldkfj alsdkfj alsdkfjasldkfj
+       ...     askf *laskdjf* asldkfj `introduction` alsdkfj
        ...     http://foo.bar\n
        ...     - aaa\n
        ...     - bbb\n

Reply via email to