lib/standard: fixes DocUnits parsed as list elements
authorAlexandre Terrasa <alexandre@moz-code.org>
Thu, 4 Dec 2014 20:17:24 +0000 (15:17 -0500)
committerAlexandre Terrasa <alexandre@moz-code.org>
Thu, 11 Dec 2014 02:01:17 +0000 (21:01 -0500)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/standard/file.nit
lib/standard/string.nit

index 88fb3c8..343707a 100644 (file)
@@ -301,12 +301,14 @@ redef class String
        #  * no I/O access is performed
        #  * the validity of the path is not checked
        #
-       #     assert "some/./complex/../../path/from/../to/a////file//".simplify_path        ==  "path/to/a/file"
-       #     assert "../dir/file".simplify_path       ==  "../dir/file"
-       #     assert "dir/../../".simplify_path        ==  ".."
-       #     assert "dir/..".simplify_path            ==  "."
-       #     assert "//absolute//path/".simplify_path ==  "/absolute/path"
-       #     assert "//absolute//../".simplify_path   ==  "/"
+       # ~~~
+       # assert "some/./complex/../../path/from/../to/a////file//".simplify_path            ==  "path/to/a/file"
+       # assert "../dir/file".simplify_path       ==  "../dir/file"
+       # assert "dir/../../".simplify_path        ==  ".."
+       # assert "dir/..".simplify_path            ==  "."
+       # assert "//absolute//path/".simplify_path ==  "/absolute/path"
+       # assert "//absolute//../".simplify_path   ==  "/"
+       # ~~~
        fun simplify_path: String
        do
                var a = self.split_with("/")
index bf59f0b..b94f1c3 100644 (file)
@@ -405,6 +405,8 @@ abstract class Text
        # * 1.0 for right-justified (all spaces at the left)
        # * 0.5 for centered (half the spaces at the left)
        #
+       # Examples
+       #
        #     assert "hello".justify(10, 0.0)  == "hello     "
        #     assert "hello".justify(10, 1.0)  == "     hello"
        #     assert "hello".justify(10, 0.5)  == "  hello   "