@@ -38,6 +38,9 @@ def format(self, tokensource, outfile):
3838 for ttype , value in tokensource :
3939 # This checks if we are at the start of a new action. If we are we should be reading a value or an action and the label and action for the previous one should be set
4040 if len (action )> 0 and (ttype == String or ttype == Keyword or ttype == Comment .Preproc ) :
41+ if action == self .checkaction :
42+ for key in keywords :
43+ self .checkaction_keywords .add ( key )
4144 if notooltips :
4245 # Reset everything for the new action
4346 action , label , keywords , notooltips = "" , "" , [], False
@@ -293,6 +296,9 @@ def format(self, tokensource, outfile):
293296 else :
294297 outfile .write ('<span class="plumedtooltip" style="color:green">' + value .strip () + '<span class="right">' + self .keyword_dict [action ]["description" ] + ' <a href="' + self .keyword_dict [action ]["hyperlink" ] + '" style="color:green">More details</a><i></i></span></span>' )
295298 # Check if there is stuff to output for the last action in the file
299+ if action == self .checkaction :
300+ for key in keywords :
301+ self .checkaction_keywords .add ( key )
296302 if len (label )> 0 and label not in all_labels and label not in self .valuedict .keys () :
297303 all_labels .add ( label )
298304 if action in self .keyword_dict and "output" in self .keyword_dict [action ]["syntax" ] : self .writeValuesData ( outfile , action , label , keywords , self .keyword_dict [action ]["syntax" ]["output" ] )
@@ -303,9 +309,6 @@ def format(self, tokensource, outfile):
303309 outfile .write ('</pre>' )
304310
305311 def writeValuesData ( self , outfile , action , label , keywords , outdict ) :
306- if action == self .checkaction :
307- for key in keywords :
308- self .checkaction_keywords .add ( key )
309312 # Some header stuff
310313 outfile .write ('<span style="display:none;" id="' + self .egname + label + r'">' )
311314 outfile .write ('The ' + action + ' action with label <b>' + label + '</b>' )
0 commit comments