News for hackers. Stuff that matters.
Re:Algorithms and Data Structures by N. Wirth [pdf] by pmarin on Friday November 19, 2010 @05:35PM (#1923090)
It is a HN bug becouse the link is not actually a pdf file. If the link ends with the pdf extension then adds the link [SCRIBD] to the url. In my opinion the link sender should add it himself IF he links to a pdf file.

   (def pdflink (url)
	  (awhen (vacuumize url)
		 (pr " [") 
		 (link "scribd" it)
		 (pr "]")))

   (defmemo vacuumize (url)
	  (and (or (endmatch ".pdf" url) (endmatch ".PDF" url))
			 (+ "http://www.scribd.com/vacuum?url= url)))

There are no comments on this comment yet.