Skip to content

Commit

Permalink
pretty print
Browse files Browse the repository at this point in the history
  • Loading branch information
liuliu committed Dec 22, 2014
1 parent 4073800 commit a35e541
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion site/_doxygen.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ def output_function file, function
desc << para if para.length > 0
end
return structs if desc.length == 0
name = markdown_safe function.at('./name').content
name = function.at('./name').content
print ' - Generating function ' + name + "\n"
name = markdown_safe name
file << "\n" + name + "\n" + ('-' * name.length) + "\n\n"
case function['kind']
when 'function'
Expand Down Expand Up @@ -95,6 +97,7 @@ def output_struct file, structname, doc_group
next if !available_desc
if first_struct
# if we haven't print the name of the struct yet, print it now
print ' - Generating struct ' + compoundname + "\n"
compoundname = markdown_safe compoundname
file << "\n" + compoundname + "\n" + ('-' * compoundname.length) + "\n\n"
header = section.at './header'
Expand Down Expand Up @@ -169,6 +172,8 @@ def open_and_output_struct out_structs, file, structname, doc_group, dirname

title = 'lib/' + compoundname.content + '.c'

print 'Generating for ' + title + "\n"

filename = '0000-01-01-' + slug + '.markdown'

file = File.open(outdir + "/" + filename, 'w+')
Expand All @@ -189,3 +194,5 @@ def open_and_output_struct out_structs, file, structname, doc_group, dirname
open_and_output_struct out_structs, file, struct, doc_group, dirname
end
end

print 'Done for ' + title + "\n"

0 comments on commit a35e541

Please sign in to comment.