fix check for empty cells in rst template

used isspace before, which is wrong from empty strings
test rst export with empty code cells
Merge pull request #5434 from minrk/rst-no-empty-code

fix check for empty cells in rst template