driusan/lmt

Feature request: Keep indentation from macros references

stefanocoretta opened this issue · 1 comments

Would it be possible to keep indentation upon tangle based on the indentation of the macro in the code block containing it (similarly to what noweb does)?

For example, in the following code block there is the macro code to be expanded, which is indented (4 spaces):

for (i in 1:5)
    <<<code>>>

and the content of the macro is the following (no indentation):

"code"

print(i)

The result should then be:

for (i in 1:5)
    print(i)

Thank you for this package, it's awesome!

Good idea!

This should be done by 3e9b60a

The generated code definitely looks better this way. (If it's because you're using a whitespace sensitive language, let me know if there's any problems.)