Skip to content

Commit 51f6005

Browse files
committed
Merge branch 'master' into vendor-css
2 parents 6703d5d + 11f1191 commit 51f6005

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,4 +81,3 @@ If you want to fix or change something, please fork on GitHub, push your change
8181
MIT, see LICENCE file
8282

8383

84-
# vim:ft=markdown

lib/docurium.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
require 'pp'
1010
require 'rugged'
1111
require 'redcarpet'
12+
require 'redcarpet/compat'
1213
require 'thread'
1314

1415
# Markdown expects the old redcarpet compat API, so let's tell it what

lib/docurium/docparser.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
require 'tempfile'
2+
require 'fileutils'
13
require 'ffi/clang'
24
include FFI::Clang
35

@@ -16,7 +18,7 @@ def parse_file(orig_filename, files)
1618
unsaved = files.map do |name, contents|
1719
full_path = File.join(tmpdir, name)
1820
dirname = File.dirname(full_path)
19-
Dir.mkdir(dirname) unless Dir.exists? dirname
21+
FileUtils.mkdir_p(dirname) unless Dir.exists? dirname
2022
File.new(full_path, File::CREAT).close()
2123

2224
UnsavedFile.new(full_path, contents)
@@ -101,7 +103,7 @@ def extract_typedef(cursor)
101103
rec[:description] = subject
102104
rec[:comments] = desc
103105
else
104-
raise "typede of unhandled #{child.type.kind}"
106+
rec[:name] = cursor.spelling
105107
end
106108
when :cursor_enum_decl
107109
rec.merge! extract_enum(child)
@@ -114,8 +116,6 @@ def extract_typedef(cursor)
114116
rec[:decl] = cursor.spelling
115117
rec[:description] = subject
116118
rec[:comments] = desc
117-
when :cursor_type_ref
118-
rec[:decl] = cursor.spelling
119119
else
120120
raise "No idea how to handle #{child.kind}"
121121
end

0 commit comments

Comments
 (0)