parameters: (self, data, parent, isText=True)
return_statement: return result
docstring: Process string with placeholders and generate ElementTree tree.
  
          Keyword arguments:
  
          * data: string with placeholders instead of ElementTree elements.
          * parent: Element, which contains processing inline data
  
          Returns: list with ElementTree elements with applied inline patterns.
docstring_summary: Process string with placeholders and generate ElementTree tree.
docstring_tokens: Process string with placeholders and generate ElementTree tree .
function: def __processPlaceholders(self, data, parent, isText=True):
          """
          Process string with placeholders and generate ElementTree tree.
  
          Keyword arguments:
  
          * data: string with placeholders instead of ElementTree elements.
          * parent: Element, which contains processing inline data
  
          Returns: list with ElementTree elements with applied inline patterns.
  
          """
          def linkText(text):
              if text:
                  if result:
                      if result[-1].tail:
                          result[-1].tail += text
                      else:
                          result[-1].tail = text
                  elif not isText:
                      if parent.tail:
                          parent.tail += text
                      else:
                          parent.tail = text
                  else:
                      if parent.text:
                          parent.text += text
                      else:
                          parent.text = text
          result = []
          strartIndex = 0
          while data:
              index = data.find(self.__placeholder_prefix, strartIndex)
              if index != -1:
                  id, phEndIndex = self.__findPlaceholder(data, index)
  
                  if id in self.stashed_nodes:
                      node = self.stashed_nodes.get(id)
  
                      if index > 0:
                          text = data[strartIndex:index]
                          linkText(text)
  
                      if not isString(node):  # it's Element
                          for child in [node] + list(node):
                              if child.tail:
                                  if child.tail.strip():
                                      self.__processElementText(
                                          node, child, False
                                      )
                              if child.text:
                                  if child.text.strip():
                                      self.__processElementText(child, child)
                      else:  # it's just a string
                          linkText(node)
                          strartIndex = phEndIndex
                          continue
  
                      strartIndex = phEndIndex
                      result.append(node)
  
                  else:  # wrong placeholder
                      end = index + len(self.__placeholder_prefix)
                      linkText(data[strartIndex:end])
                      strartIndex = end
              else:
                  text = data[strartIndex:]
                  if isinstance(data, util.AtomicString):
                      # We don't want to loose the AtomicString
                      text = util.AtomicString(text)
                  linkText(text)
                  data = ""
  
          return result
function_tokens: def __processPlaceholders ( self , data , parent , isText = True ) : def linkText ( text ) : if text : if result : if result [ - 1 ] . tail : result [ - 1 ] . tail += text else : result [ - 1 ] . tail = text elif not isText : if parent . tail : parent . tail += text else : parent . tail = text else : if parent . text : parent . text += text else : parent . text = text result = [ ] strartIndex = 0 while data : index = data . find ( self . __placeholder_prefix , strartIndex ) if index != - 1 : id , phEndIndex = self . __findPlaceholder ( data , index ) if id in self . stashed_nodes : node = self . stashed_nodes . get ( id ) if index > 0 : text = data [ strartIndex : index ] linkText ( text ) if not isString ( node ) : # it's Element for child in [ node ] + list ( node ) : if child . tail : if child . tail . strip ( ) : self . __processElementText ( node , child , False ) if child . text : if child . text . strip ( ) : self . __processElementText ( child , child ) else : # it's just a string linkText ( node ) strartIndex = phEndIndex continue strartIndex = phEndIndex result . append ( node ) else : # wrong placeholder end = index + len ( self . __placeholder_prefix ) linkText ( data [ strartIndex : end ] ) strartIndex = end else : text = data [ strartIndex : ] if isinstance ( data , util . AtomicString ) : # We don't want to loose the AtomicString text = util . AtomicString ( text ) linkText ( text ) data = "" return result