Skip to content
This repository
Browse code

remove style for ebooks, improve regexps for figures

  • Loading branch information...
commit ec3fffc19574ccce74180a145e4abe574933ab19 1 parent 36db769
Sergey Avseyev avsej authored

Showing 2 changed files with 1 addition and 25 deletions. Show diff stats Hide diff stats

  1. +0 23 ebooks/style.css
  2. +1 2  makeebooks
23 ebooks/style.css
... ... @@ -1,23 +0,0 @@
1   -ul {
2   - margin: 20px;
3   -}
4   -
5   -ol {
6   - margin: 20px;
7   -}
8   -
9   -body pre {
10   - margin: 10px;
11   - font-weight: bold;
12   -}
13   -
14   -body pre2 {
15   - background-color: silver;
16   - padding: 10px;
17   - border-top-style: solid;
18   - border-left-style: solid;
19   - border-left-width: 1px;
20   - border-top-width: 1px;
21   - overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
22   - white-space: pre-wrap; /* css-3 */
23   -}
3  makeebooks
@@ -32,7 +32,7 @@ ARGV.each do |lang|
32 32 Dir[File.join(dir, '**', '*.markdown')].each do |input|
33 33 puts "processing #{input}"
34 34 content = File.read(input)
35   - content.gsub!(/Insert\s+(.*)(\.png)\s+\nFigure\s+(.*)/, '![\3](figures/\1-tn\2 "\3")')
  35 + content.gsub!(/Insert\s+(.*)(\.png)\s*\n?\s*Figure\s+(.*)/, '![\3](figures/\1-tn\2 "\3")')
36 36 book_content << RDiscount.new(content).to_html
37 37 end
38 38 book_content << "</body></html>"
@@ -48,6 +48,5 @@ ARGV.each do |lang|
48 48 '--level1-toc', '//h:h1',
49 49 '--level2-toc', '//h:h2',
50 50 '--level3-toc', '//h:h3',
51   - '--extra-css', 'ebooks/style.css',
52 51 '--language', lang)
53 52 end

0 comments on commit ec3fffc

Please sign in to comment.
Something went wrong with that request. Please try again.