File: pre_wrap.rb

package info (click to toggle)
tdiary 5.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,088 kB
  • sloc: ruby: 23,031; javascript: 1,029; xml: 325; makefile: 26; sh: 4
file content (19 lines) | stat: -rw-r--r-- 459 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#
# pre_wrap.rb: word wrapping style for preformat (<pre>)
#
# Copyright (C) 2010 TADA Tadashi <t@tdtds.jp>
# You can redistribute it and/or modify it under GPL2 or any later version.
#
add_header_proc do
	<<-STYLE
		<style type="text/css"><!--
			div.section pre, div.commentbody a {
				white-space: -moz-pre-wrap;
				white-space: -pre-wrap;
				white-space: -o-pre-wrap;
				white-space: pre-wrap;
				word-wrap: break-word;
			}
		--></style>
	STYLE
end