class_docstr: Read notebook cells from Sphinx Gallery scripts (#80)
class_docstr_tok: ["Read","notebook","cells","from","Sphinx","Gallery","scripts","(","#","80",")"]
docstr: Parse cell till its end and set content, lines_to_next_cell.
  Return the position of next cell start
docstr_tok: ["Parse","cell","till","its","end","and","set","content",",","lines_to_next_cell",".","Return","the","position","of","next","cell","start"]
code: def find_cell_content(self, lines):
      """Parse cell till its end and set content, lines_to_next_cell.
      Return the position of next cell start"""
      (
          cell_end_marker,
          next_cell_start,
          explicit_eoc,
      ) = self.find_cell_end(lines)
  
      # Metadata to dict
      cell_start = 0
      if self.cell_type == "markdown":
          if self.markdown_marker in ['"""', "'''"]:
              # Remove the triple quotes
              if lines[0].strip() == self.markdown_marker:
                  cell_start = 1
              else:
                  lines[0] = lines[0][3:]
              if not explicit_eoc:
                  last = lines[cell_end_marker - 1]
                  lines[cell_end_marker - 1] = last[
                      : last.rfind(self.markdown_marker)
                  ]
          if self.twenty_hash.match(self.markdown_marker):
              cell_start = 1
      else:
          self.metadata = {}
  
      # Cell content
      source = lines[cell_start:cell_end_marker]
      self.org_content = copy(source)
  
      if self.cell_type == "code" and self.comment_magics:
          uncomment_magic(
              source, self.language or self.default_language
          )
  
      if self.cell_type == "markdown" and source:
          if self.markdown_marker.startswith(self.comment):
              source = uncomment(source, self.comment)
          if self.rst2md:
              if rst2md:
                  source = rst2md("\n".join(source)).splitlines()
              else:
                  raise ImportError(
                      "Could not import rst2md from sphinx_gallery.notebook"
                  )  # pragma: no cover
  
      self.content = source
  
      self.lines_to_next_cell = count_lines_to_next_cell(
          cell_end_marker, next_cell_start, len(lines), explicit_eoc
      )
  
      return next_cell_start
  
imports: import re
  import warnings
  from copy import copy
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell
  from packaging.version import parse
  from .doxygen import doxygen_to_markdown
  from .languages import _SCRIPT_EXTENSIONS
  from .cell_metadata import is_active, is_json_metadata, rmd_options_to_metadata, text_to_metadata
  from .languages import _JUPYTER_LANGUAGES_LOWER_AND_UPPER
  from .magics import is_magic, need_explicit_marker, uncomment_magic, unescape_code_start
  from .pep8 import pep8_lines_between_cells
  from .stringparser import StringParser
label_desc: Use image node_id 5 for calling the SphinxGalleryScriptCellReader obj's underlying member method code with example usage: obj.find_cell_content(lines) and returns: next_cell_start