Browse Source

Fit 80 colums

master
Andrea Luzzardi 18 years ago
parent
commit
8f9064af6e
1 changed files with 7 additions and 4 deletions
  1. +7
    -4
      fetch_doc.rb

+ 7
- 4
fetch_doc.rb View File

@ -19,16 +19,19 @@ REPLACE_LIST = [
# Remove wiki links [[link|name]] # Remove wiki links [[link|name]]
{ :pattern => /\[\[.+\|(.+)\]\]/, :with => '\1' }, { :pattern => /\[\[.+\|(.+)\]\]/, :with => '\1' },
# Remove trailing whitespaces
{ :pattern => /^ /, :with => '' },
# Remove misc xhtml / wiki characters
# Remove misc xhtml/wiki characters
{ :pattern => /\/\//, :with => '' }, { :pattern => /\/\//, :with => '' },
{ :pattern => /\\\\ /, :with => '' }, { :pattern => /\\\\ /, :with => '' },
{ :pattern => /\*\*/, :with => '' }, { :pattern => /\*\*/, :with => '' },
{ :pattern => /&lt;/, :with => '<' }, { :pattern => /&lt;/, :with => '<' },
{ :pattern => /&gt;/, :with => '>' }, { :pattern => /&gt;/, :with => '>' },
{ :pattern => /&quot;/, :with => '"' }, { :pattern => /&quot;/, :with => '"' },
# Remove trailing whitespaces
{ :pattern => /^ /, :with => '' },
# Fit 80 colums
{ :pattern => /(.{1,80})( +|$\n?)|(.{1,80})/, :with => "\\1\\3\n" },
] ]
def fetch_doc(name) def fetch_doc(name)


Loading…
Cancel
Save