R, 83/7572 bytes
Alt approach using regexps
If we're allowed a trailing newline, 7572 bytes:
function(s,n)cat(gsub("([^\n]*\n[^
]*
)",r,gsub("([^\n][^
])",r<-strrep("\\1",n),s)))
Otherwise, 83 bytes:
function(s,n)write(rep(el(strsplit(gsub("([^\n])",strrep("\\1",n),s),"\n")),e=n),1)