From 1e838f74b66e21c3918742b8249a42fe0517e5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Sat, 3 May 2008 05:56:27 +0200 Subject: [PATCH] properly indent a bunch of code samples --- README.rdoc | 46 +++++++++++++++---------------- lib/haml.rb | 29 ++++++++++---------- lib/sass.rb | 78 ++++++++++++++++++++++++++--------------------------- 3 files changed, 76 insertions(+), 77 deletions(-) diff --git a/README.rdoc b/README.rdoc index a9b14b90..9f1f9fde 100644 --- a/README.rdoc +++ b/README.rdoc @@ -232,35 +232,35 @@ Taking the idea of constants a bit further are mixins. These let you group whole swathes of CSS attributes into a single directive and then include those anywhere you want: -=blue-border - :border - :color blue - :width 2px - :style dotted + =blue-border + :border + :color blue + :width 2px + :style dotted -.comment - +blue-border - :padding 2px - :margin 10px 0 + .comment + +blue-border + :padding 2px + :margin 10px 0 -.reply - +blue-border + .reply + +blue-border becomes: -.comment { - border-color: blue; - border-width: 2px; - border-style: dotted; - padding: 2px; - margin: 10px 0; -} + .comment { + border-color: blue; + border-width: 2px; + border-style: dotted; + padding: 2px; + margin: 10px 0; + } -.reply { - border-color: blue; - border-width: 2px; - border-style: dotted; -} + .reply { + border-color: blue; + border-width: 2px; + border-style: dotted; + } A comprehensive list of features is in the documentation for the Sass module. diff --git a/lib/haml.rb b/lib/haml.rb index dc750ebb..6c1ee998 100644 --- a/lib/haml.rb +++ b/lib/haml.rb @@ -651,9 +651,8 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir) # yo #

# -# If the :escape_html option is set, -# = will sanitize any HTML-sensitive characters generated by the script. -# For example: +# If the :escape_html option is set, = will sanitize any +# HTML-sensitive characters generated by the script. For example: # # = '' # @@ -804,29 +803,29 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir) # # For example: # -# %p foo -# -# This is a comment -# %p bar +# %p foo +# -# This is a comment +# %p bar # # is compiled to: # -#

foo

-#

bar

+#

foo

+#

bar

# # You can also nest text beneath a silent comment. # None of this text will be rendered. # For example: # -# %p foo -# -# -# This won't be displayed -# Nor will this -# %p bar +# %p foo +# -# +# This won't be displayed +# Nor will this +# %p bar # # is compiled to: # -#

foo

-#

bar

+#

foo

+#

bar

# # == Other Useful Things # diff --git a/lib/sass.rb b/lib/sass.rb index b04ff1de..4e65784a 100644 --- a/lib/sass.rb +++ b/lib/sass.rb @@ -128,7 +128,7 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir) # # By default, either attribute syntax may be used. # If you want to force one or the other, -# see the :attribute_syntax option below. +# see the :attribute_syntax option below. # # === Nested Rules # @@ -606,28 +606,28 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir) # To define a mixin you use a slightly modified form of selector syntax. # For example the 'large-text' mixin is defined as follows: # -# =large-text -# :font -# :family Arial -# :size 20px -# :weight bold -# :color #ff0000 +# =large-text +# :font +# :family Arial +# :size 20px +# :weight bold +# :color #ff0000 # # The initial '=' marks this as a mixin rather than a standard selector. # The CSS rules that follow won't be included until the mixin is referenced later on. # Anything you can put into a standard selector, # you can put into a mixin definition. e.g. # -# =clearfix -# display: inline-block -# &:after -# content: "." -# display: block -# height: 0 -# clear: both -# visibility: hidden -# * html & -# height: 1px +# =clearfix +# display: inline-block +# &:after +# content: "." +# display: block +# height: 0 +# clear: both +# visibility: hidden +# * html & +# height: 1px # # # === Mixing it in @@ -637,23 +637,23 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir) # So to inline the 'large-text' defined earlier, # we include the statment '+large-text' in our selector definition thus: # -# .page-title -# +large-text -# :padding 4px -# :margin -# :top 10px +# .page-title +# +large-text +# :padding 4px +# :margin +# :top 10px # # # This will produce the following CSS output: # -# .page-title { -# font-family: Arial; -# font-size: 20px; -# font-weight: bold; -# color: #ff0000; -# padding: 4px; -# margin-top: 10px; -# } +# .page-title { +# font-family: Arial; +# font-size: 20px; +# font-weight: bold; +# color: #ff0000; +# padding: 4px; +# margin-top: 10px; +# } # # Any number of mixins may be defined and there is no limit on # the number that can be included in a particular selector. @@ -661,16 +661,16 @@ $LOAD_PATH << dir unless $LOAD_PATH.include?(dir) # Mixin definitions can also include references to other mixins defined earlier in the file. # E.g. # -# =highlighted-background -# background: -# color: #fc0 -# =header-text -# font: -# size: 20px +# =highlighted-background +# background: +# color: #fc0 +# =header-text +# font: +# size: 20px # -# =compound -# +highlighted-background -# +header-text +# =compound +# +highlighted-background +# +header-text # # # == Output Style