all repos — markup @ d33f853614852bcb73eae96221b1029f73eb78ef

The code we use to render README.your_favorite_markup

Remove man page support, not ready for prime time.
Chris Wanstrath chris@ozmm.org
Fri, 23 Apr 2010 07:58:21 -0700
commit

d33f853614852bcb73eae96221b1029f73eb78ef

parent

74d41a91bb58f9ed219e1bc7a094daa1687ad0a8

3 files changed, 0 insertions(+), 345 deletions(-)

jump to
M lib/github/markups.rblib/github/markups.rb

@@ -28,26 +28,3 @@ if rendered =~ /<!-- start doc -->\s*(.+)\s*<!-- end doc -->/mi

$1 end end - -# -# man pages! -# -command('groff -t -e -mandoc -Thtml -P -l -P -r -', /\d/) do |rendered, original| - # Try to grab the name and section. - if original =~ /^.TH (\S+).*?(\d).*$/ - # Clear out the gunk, "MUSTACHE" => MUSTACHE - name, section = $1, $2 - name.gsub!(/"|'/, '') - - # make MUSTACHE(1) - title = "#{name}(#{section})" - - # Classy divs. - left = "<div style='float:left'>#{title}</div>" - right = "<div style='float:right'>#{title}</div>" - end - - if rendered =~ /<body>\s*(.+)\s*<\/body>/mi - $1.gsub(/<hr>/, '').gsub(/(<h1.+?h1>)/, "#{left}#{right}\\1") - end -end
D test/markups/README.1

@@ -1,138 +0,0 @@

-.\" generated with Ron/v0.3 -.\" http://github.com/rtomayko/ron/ -. -.TH "MUSTACHE" "1" "March 2010" "DEFUNKT" "Mustache Manual" -. -.SH "NAME" -\fBmustache\fR \-\- Mustache processor -. -.SH "SYNOPSIS" -\fBcat data.yml template.mustache | mustache\fR -. -.SH "DESCRIPTION" -Mustache is a logic\-less templating system for HTML, config files, -anything. -. -.P -The \fBmustache\fR command processes a Mustache template preceded by YAML -frontmatter from standard input and prints one or more documents to -standard output. -. -.P -YAML frontmatter beings with \fB---\fR on a single line, followed by YAML, -ending with another \fB---\fR on a single line, e.g. -. -.IP "" 4 -. -.nf - -\fB--- -names: [ {name: chris}, {name: mark}, {name: scott} ] ---- \fR -. -.fi -. -.IP "" 0 -. -.P -If you are unfamiliar with YAML, it is a superset of JSON. Valid JSON -should work fine. -. -.P -After the frontmatter should come any valid Mustache template. See -mustache(5) for an overview of Mustache templates. -. -.P -For example: -. -.IP "" 4 -. -.nf - -\fB{{#names}} - Hi {{name}}! -{{/names}} \fR -. -.fi -. -.IP "" 0 -. -.P -Now let's combine them. -. -.IP "" 4 -. -.nf - -\fB$ cat data.yml ---- -names: [ {name: chris}, {name: mark}, {name: scott} ] ---- -$ cat template.mustache -{{#names}} - Hi {{name}}! -{{/names}} - -$ cat data.yml template.mustache | mustache -Hi chris! -Hi mark! -Hi scott! -\fR -. -.fi -. -.IP "" 0 -. -.P -If you provide multiple YAML documents (as delimited by \fB---\fR), your -template will be rendered multiple times. Like a mail merge. -. -.P -For example: -. -.IP "" 4 -. -.nf - -\fB$ cat data.yml ---- -name: chris ---- -name: mark ---- -name: scott ---- -$ cat template.mustache -Hi {{name}}! - -$ cat data.yml template.mustache | mustache -Hi chris! -Hi mark! -Hi scott! -\fR -. -.fi -. -.IP "" 0 -. -.SH "INSTALLATION" -If you have RubyGems installed: -. -.IP "" 4 -. -.nf - -\fBgem install mustache \fR -. -.fi -. -.IP "" 0 -. -.SH "COPYRIGHT" -Mustache is Copyright (C) 2009 Chris Wanstrath -. -.P -Original CTemplate by Google -. -.SH "SEE ALSO" -mustache(5), mustache(7), gem(1),\fIhttp://defunkt.github.com/mustache/\fR
D test/markups/README.1.html

@@ -1,184 +0,0 @@

-<div style='float:left'>MUSTACHE(1)</div><div style='float:right'>MUSTACHE(1)</div><h1 align=center>MUSTACHE</h1> - - - -<a name="NAME"></a> -<h2>NAME</h2> - - - -<p style="margin-left:11%; margin-top: 1em"><b>mustache</b> -&minus;&minus; Mustache processor</p> - -<a name="SYNOPSIS"></a> -<h2>SYNOPSIS</h2> - - -<p style="margin-left:11%; margin-top: 1em"><b>cat data.yml -template.mustache | mustache</b></p> - -<a name="DESCRIPTION"></a> -<h2>DESCRIPTION</h2> - - -<p style="margin-left:11%; margin-top: 1em">Mustache is a -logic&minus;less templating system for HTML, config files, -anything.</p> - -<p style="margin-left:11%; margin-top: 1em">The -<b>mustache</b> command processes a Mustache template -preceded by YAML frontmatter from standard input and prints -one or more documents to standard output.</p> - -<p style="margin-left:11%; margin-top: 1em">YAML -frontmatter beings with <b>---</b> on a single line, -followed by YAML, ending with another <b>---</b> on a single -line, e.g.</p> - -<table width="100%" border=0 rules="none" frame="void" - cellspacing="0" cellpadding="0"> -<tr valign="top" align="left"> -<td width="17%"></td> -<td width="5%"> - - -<p style="margin-top: 1em" valign="top"><b>---</b></p></td> -<td width="78%"> -</td> -</table> - -<p style="margin-left:17%;"><b>names: [ {name: chris}, -{name: mark}, {name: scott} ] <br> ----</b></p> - -<p style="margin-left:11%; margin-top: 1em">If you are -unfamiliar with YAML, it is a superset of JSON. Valid JSON -should work fine.</p> - -<p style="margin-left:11%; margin-top: 1em">After the -frontmatter should come any valid Mustache template. See -mustache(5) for an overview of Mustache templates.</p> - -<p style="margin-left:11%; margin-top: 1em">For -example:</p> - -<table width="100%" border=0 rules="none" frame="void" - cellspacing="0" cellpadding="0"> -<tr valign="top" align="left"> -<td width="17%"></td> -<td width="15%"> - - - -<p style="margin-top: 1em" valign="top"><b>{{#names}}</b></p> </td> -<td width="68%"> -</td> -</table> - -<p style="margin-left:17%;"><b>Hi {{name}}! <br> -{{/names}}</b></p> - -<p style="margin-left:11%; margin-top: 1em">Now let&rsquo;s -combine them.</p> - -<table width="100%" border=0 rules="none" frame="void" - cellspacing="0" cellpadding="0"> -<tr valign="top" align="left"> -<td width="17%"></td> -<td width="21%"> - - -<p style="margin-top: 1em" valign="top"><b>$ cat -data.yml</b></p> </td> -<td width="62%"> -</td> -</table> - -<p style="margin-left:17%;"><b>--- <br> -names: [ {name: chris}, {name: mark}, {name: scott} ] <br> ---- <br> -$ cat template.mustache <br> -{{#names}} <br> -Hi {{name}}! <br> -{{/names}}</b></p> - -<p style="margin-left:17%; margin-top: 1em"><b>$ cat -data.yml template.mustache | mustache <br> -Hi chris! <br> -Hi mark! <br> -Hi scott!</b></p> - -<p style="margin-left:11%; margin-top: 1em">If you provide -multiple YAML documents (as delimited by <b>---</b>), your -template will be rendered multiple times. Like a mail -merge.</p> - -<p style="margin-left:11%; margin-top: 1em">For -example:</p> - -<table width="100%" border=0 rules="none" frame="void" - cellspacing="0" cellpadding="0"> -<tr valign="top" align="left"> -<td width="17%"></td> -<td width="21%"> - - -<p style="margin-top: 1em" valign="top"><b>$ cat -data.yml</b></p> </td> -<td width="62%"> -</td> -</table> - -<p style="margin-left:17%;"><b>--- <br> -name: chris <br> ---- <br> -name: mark <br> ---- <br> -name: scott <br> ---- <br> -$ cat template.mustache <br> -Hi {{name}}!</b></p> - -<p style="margin-left:17%; margin-top: 1em"><b>$ cat -data.yml template.mustache | mustache <br> -Hi chris! <br> -Hi mark! <br> -Hi scott!</b></p> - -<a name="INSTALLATION"></a> -<h2>INSTALLATION</h2> - - -<p style="margin-left:11%; margin-top: 1em">If you have -RubyGems installed:</p> - -<table width="100%" border=0 rules="none" frame="void" - cellspacing="0" cellpadding="0"> -<tr valign="top" align="left"> -<td width="17%"></td> -<td width="31%"> - - -<p style="margin-top: 1em" valign="top"><b>gem install -mustache</b></p> </td> -<td width="52%"> -</td> -</table> - -<a name="COPYRIGHT"></a> -<h2>COPYRIGHT</h2> - - -<p style="margin-left:11%; margin-top: 1em">Mustache is -Copyright (C) 2009 Chris Wanstrath</p> - -<p style="margin-left:11%; margin-top: 1em">Original -CTemplate by Google</p> - -<a name="SEE ALSO"></a> -<h2>SEE ALSO</h2> - - -<p style="margin-left:11%; margin-top: 1em">mustache(5), -mustache(7), -gem(1),<i>http://defunkt.github.com/mustache/</i></p>