Fix path encoding issues in C/C++ scraper

Fixes #767.
pull/775/head
Thibaut Courouble 7 years ago
parent a54038cb05
commit e3ef139111

@ -103,7 +103,9 @@ module Docs
end end
def clean_path(path) def clean_path(path)
path.gsub %r{[!;:]+}, '-' path = path.gsub %r{[!;:]}, '-'
path = path.gsub %r{\+}, '_plus_'
path
end end
end end
end end

@ -1,7 +1,7 @@
module Docs module Docs
class C < FileScraper class C < FileScraper
self.type = 'c' self.type = 'c'
self.dir = '/Users/Thibaut/DevDocs/Docs/C/c' self.dir = '/Users/Thibaut/DevDocs/Docs/c'
self.base_url = 'http://en.cppreference.com/w/c/' self.base_url = 'http://en.cppreference.com/w/c/'
self.root_path = 'header.html' self.root_path = 'header.html'

@ -3,7 +3,7 @@ module Docs
self.name = 'C++' self.name = 'C++'
self.slug = 'cpp' self.slug = 'cpp'
self.type = 'c' self.type = 'c'
self.dir = '/Users/Thibaut/DevDocs/Docs/C/cpp' self.dir = '/Users/Thibaut/DevDocs/Docs/cpp'
self.base_url = 'http://en.cppreference.com/w/cpp/' self.base_url = 'http://en.cppreference.com/w/cpp/'
self.root_path = 'header.html' self.root_path = 'header.html'

Loading…
Cancel
Save