lib: fix nitish in nitunits
authorAlexandre Terrasa <alexandre@moz-code.org>
Wed, 13 May 2015 23:45:16 +0000 (19:45 -0400)
committerAlexandre Terrasa <alexandre@moz-code.org>
Wed, 10 Jun 2015 22:22:35 +0000 (18:22 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>

lib/bitmap/bitmap.nit
lib/crypto.nit
lib/html/html.nit

index 9be1bc2..003eb6f 100644 (file)
 # The Bitmap class represents a 24-bit bitmap image. An instance can be constructed
 # by calling load or with_size:
 #
-#      new Bitmap.load(path_to_a_bmp_file)
-#      new Bitmap.with_size(400, 300)
+# ~~~nitish
+# var bm1 = new Bitmap.load(path_to_a_bmp_file)
+# var bm2 = new Bitmap.with_size(400, 300)
+# ~~~
 #
 # The width and height attributes contain the image's width and height,
 # respectively.
 #
 # Individual pixels can be manipulated by calling the set_pixel function:
 #
+# ~~~nitish
 #      set_pixel(x, y, color)
+# ~~~
 #
 # The no-argument grayscale function converts the bitmap to grayscale and is an
 # implementation of this Rossetacode task:
@@ -33,7 +37,9 @@
 #
 # Finally, the bitmap can be saved to a file by calling save:
 #
+# ~~~nitish
 #      save(path_to_a_file)
+# ~~~
 #
 # For information on the bitmap format, see
 # http://en.wikipedia.org/wiki/BMP_file_format
index a4abbd1..8071a9d 100644 (file)
@@ -81,11 +81,14 @@ redef class String
        #
        # Say we have "fuckingbehemoth".railfence(4)
        #
-       # This happens in-memory :
-       #       f.....g.....o..
-       #       .u...n.b...m.t.
-       #       ..c.i...e.e...h
-       #       ...k.....h.....
+       # This happens in-memory:
+       #
+       # ~~~raw
+       # f.....g.....o..
+       # .u...n.b...m.t.
+       # ..c.i...e.e...h
+       # ...k.....h.....
+       # ~~~
        #
        # Therefore, yielding the ciphertext : "fgounbmtcieehkh"
        #
index b0d6f65..9b88578 100644 (file)
@@ -19,13 +19,18 @@ module html
 #
 # You can define subclass and override methods head and body
 #
+# ~~~nitish
 # class MyPage
 #      super HTMLPage
 #      redef body do add("p").text("Hello World!")
 # end
+# ~~~
 #
 # HTMLPage use fluent interface so you can chain calls as:
-#      add("div").attr("id", "mydiv").text("My Div")
+#
+# ~~~nitish
+# add("div").attr("id", "mydiv").text("My Div")
+# ~~~
 class HTMLPage
        super Writable
 
@@ -51,7 +56,10 @@ class HTMLPage
        end
 
        # Add a html tag to the current element
+       #
+       # ~~~nitish
        # add("div").attr("id", "mydiv").text("My Div")
+       # ~~~
        fun add(tag: String): HTMLTag do
                var node = new HTMLTag(tag)
                current.add(node)
@@ -59,14 +67,20 @@ class HTMLPage
        end
 
        # Add a raw html string
+       #
+       # ~~~nitish
        # add_html("<a href='#top'>top</a>")
+       # ~~~
        fun add_html(html: String) do current.add(new HTMLRaw("", html))
 
        # Open a html tag
+       #
+       # ~~~nitish
        # open("ul")
        # add("li").text("item1")
        # add("li").text("item2")
        # close("ul")
+       # ~~~
        fun open(tag: String): HTMLTag do
                stack.push(current)
                current = add(tag)