cqfn / pdd

Command line toolkit for collecting TODO markers from your code, known as Puzzle Driven Development (PDD)
https://www.0pdd.com
MIT License
76 stars 25 forks source link

too much consumed into puzzle body #209

Closed yegor256 closed 2 years ago

yegor256 commented 2 years ago

This is my code:

@todo #42 hello
 good bye
hello again

This is what pdd 0.21.1 generates as puzzle body:

hello good bye hello again

I expect it to be:

hello good bye

The problem is urgent, since we generate wrong puzzles now, for example: https://github.com/yegor256/takes/issues/1131

yegor256 commented 2 years ago

@mbao01 please, help us

yegor256 commented 2 years ago

@php-coder this should be fixed soon and will help

mbao01 commented 2 years ago

@yegor256 the example provided above passes. It is a valid puzzle and the output is hello good bye.

On the contrary, the todo below will produce hello good by hello again

/*
 * @todo #42 hello
 *  good bye
 * hello again
 */
mbao01 commented 2 years ago

I guess to keep this backward compatible, if a todo comment uses the indentation style, then we body will be the first line till the last indented line.

yegor256 commented 2 years ago

@mbao01 yes, indeed. This code:

/*
 * @todo #42 hello
 *  good bye
 * hello again
 */

must produce hello good bye puzzle body