I am trying to document some rake tasks I've written using RDoc comments in my class and am running into trouble representing square brackets. I want to add some examples of how to run my rake tasks with parameters and so have an rdoc line like so:
# eg. rake build[MyProject]
The problem is that the RDoc parser convert creates a link instead of printing the square brackets. I have tried all sorts of escape sequences: [ ; [[ ; #{[MyProject]} ; [MyProject] but nothing seems to work.
Is there any way to escape these square brackets so they don't convert to a link?
Thanks, Aaron
Well with further experimentation I discovered a way to do it. If I put two spaces in front of each line, RDoc treats the line as pre formatted text and renders the brackets. Good enough for me.
The resulting RDoc line is:
# eg. rake build[MyProject]