rtomayko / shocco

shocco is a quick-and-dirty, literate-programming-style documentation generator for / in POSIX shell
http://rtomayko.github.com/shocco/
Other
202 stars 38 forks source link

Shocco doesn't understand the code inside here documents #22

Open pablox-cl opened 11 years ago

pablox-cl commented 11 years ago

I've been using shocco for a while and found that if I have something like:

cat << EOF >> somefile.sh
# I'm a comment
hello I'm a here document
EOF

Results in:

cat << EOF >> somefile.sh
# DIVIDER
hello I'm a here document
EOF

The workaround of course is use something like #/.

rtomayko commented 11 years ago

Yeah, this is a longstanding issue. I'm not sure there's much we can easily do about it with the current system. Something like docco or rocco might handle this a bit better.

pablox-cl commented 11 years ago

Well, I'm using:

cat << EOF >> somefile.sh
#/ I'm a comment
hello I'm a here document
EOF

...as a workaround. It's not specially beautiful, but it is functional, and until now it seems to work fine.

Sorry, I don't understand what this have to do with docco/rocco... can they parse shell files?

rtomayko commented 11 years ago

Sorry, I don't understand what this have to do with docco/rocco... can they parse shell files?

Yeah I believe they support anything that pygments supports. Their heredoc handling may be a bit better since they have a more rich set of string parsing utilities at their disposal is all I was thinking.

pablox-cl commented 11 years ago

On 20 November 2012 03:46, Ryan Tomayko notifications@github.com wrote:

Sorry, I don't understand what this have to do with docco/rocco... can they parse shell files?

Yeah I believe they support anything that pygments supports. Their heredoc handling may be a bit better since they have a more rich set of string parsing utilities at their disposal is all I was thinking

Oh, ok. I understand. As I said, I can work with my workaround, isn't that terrible.

Regards,

Pablo Olmos de Aguilera Corradini - @PaBLoX http://www.glatelier.org/ http://about.me/pablox/ http://www.linkedin.com/in/pablooda/ Linux User: #456971 - http://counter.li.org/