BBcode code tags corrupt source code

the BBcode code tags corrupt source code, e.g. it’s dropping blank lines, other than Markdown tags:

by markdown :

line1

   line3 
      line4    
   line5 

line7
line8

line10

by BBcode:

line1

   line3 
      line4    
   line5 

line7
line8

line10

Thanks! I think this has been addressed with my last post on this thread here.