alanshaw/markdown-pdf — pull request #4 by alexwhitman (2013-06-27 13:12:59+00:00)
Title: Use copied source array before concatenating files

In grunt-markdown-pdf at https://github.com/alanshaw/grunt-markdown-pdf/blob/master/tasks/markdownpdf.js#L44 `srcs[0]` is used to determine the name of the output PDF. When using the `concatFiles` option, the `concatFiles` function modifies the file paths array which then leaves `srcs` as an empty array.

This patch fixes the issue by taking a copy by value of the file paths array before iterating over it.