Use the text structure to provide the formatting information for the VI Context Help. NaturalDocs (see http://naturaldocs.org) does this very nicely for text based languages such as C#, Perl, Python, etc. It detects bullet lists, documentation sections, etc. An example from some Perl code,
# Method: new(testName, startTime, stopTime, result, error, spec, measurement)
# constructor for the PatternTest class
#
# Arguments:
# * testName - Name for the test/measurement that will appear in the
# report.
# * startTime - test start time in xs:time format
# * stopTime - test stop time in xs:time format
# * result - test result, e.g. Passed, Failed. See report schema.
# * error - error information. Use either an anonymous empty hash or a
# hash with the following keys: message, code, occurred
# * spec - pattern specification
# * measurement - measured value or reported string
becomes:
new(testName, startTime, stopTime, result, error, spec, measurement)
sub new |
constructor for the PatternTest class
Arguments
Returns
reference to created object
Beautiful! Just what I would expect! And the original is still readable and editable by a human. In addition, *bold* becomes bold instead of <b>bold</b> and _underlined_ becomes underlined.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Any idea that has not received any kudos within a year after posting will be automatically declined.