Commits

Luke Plant committed 769150d

Clarified some comments.

Comments (0)

Files changed (1)

semanticeditor/utils/presentation.py

         self.name = name
         # verbose_name, description and allowed_elements are additional pieces
         # of information that are only needed when the client is requesting a
-        # list of styles.  In other sitations these objects may not have these
+        # list of styles.  In other situations these objects may not have these
         # attributes filled in.
         self.verbose_name = verbose_name
         self.description = description
     @property
     def prefix(self):
         """
-        This is a prefix used to generate a name for storing this command
-        against a section.
+        This is a prefix used to generate a name used for registering this
+        command against a section and storing other presentation info.
         """
+        # If there is, for example, a section 'h1_1' in the document, this
+        # prefix is used to generate e.g. newrow_h1_1. The presence of the
+        # name 'newrow_h1_1' says that a 'newrow' command was used against
+        # h1_1, and it also allows PresentationClass objects to be stored
+        # against newrow_h1_1 itself, which represents the entire row.
+
         return self.name + "_"
 
 NEWROW = PresentationCommand('newrow',
         if si:
             row_presinfo = row_info.get(si.sect_id)
             if row_presinfo is not None:
-                # We can assume row_presinfo contains NEWROW command
+                # We have a NEWROW against si.sect_id
 
                 # Finish current col and row, if they have anything in them
                 if col.nodes:
 
             col_presinfo = col_info.get(si.sect_id)
             if col_presinfo is not None:
-                # Assume col_presinfo contains NEWCOL command
+                # We have NEWCOL against si.sect_id
 
                 # Finish current col, if it is non-empty
                 if col.nodes:
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.