##// END OF EJS Templates
Parse text with <p> tag. Use single newline after replying a post. Removed...
neko259 -
r744:3db85d22 2.0-dev
parent child Browse files
Show More
@@ -127,7 +127,7 b' def render_reflink(tag_name, value, opti'
127
127
128
128
129 def bbcode_extended(markup):
129 def bbcode_extended(markup):
130 parser = bbcode.Parser()
130 parser = bbcode.Parser(newline='</p><p>')
131 parser.add_formatter('post', render_reflink, strip=True)
131 parser.add_formatter('post', render_reflink, strip=True)
132 parser.add_simple_formatter('quote',
132 parser.add_simple_formatter('quote',
133 u'<span class="multiquote">%(value)s</span>')
133 u'<span class="multiquote">%(value)s</span>')
@@ -139,7 +139,7 b' def bbcode_extended(markup):'
139 u'<span class="strikethrough">%(value)s</span>')
139 u'<span class="strikethrough">%(value)s</span>')
140 parser.add_simple_formatter('code',
140 parser.add_simple_formatter('code',
141 u'<pre><code>%(value)s</pre></code>')
141 u'<pre><code>%(value)s</pre></code>')
142 return parser.format(markup)
142 return '<p>%s</p>' % parser.format(markup)
143
143
144 formatters = [
144 formatters = [
145 QuotePattern,
145 QuotePattern,
@@ -132,14 +132,6 b' p {'
132 .form-errors {
132 .form-errors {
133 font-weight: bolder;
133 font-weight: bolder;
134 vertical-align: middle;
134 vertical-align: middle;
135 padding: 3px;
136 background: repeating-linear-gradient(
137 -45deg,
138 #330,
139 #330 10px,
140 #111 10px,
141 #111 20px
142 );
143 }
135 }
144
136
145 .post-form input:not([name="image"]), .post-form textarea {
137 .post-form input:not([name="image"]), .post-form textarea {
@@ -35,10 +35,10 b' function moveCaretToEnd(el) {'
35 }
35 }
36
36
37 function addQuickReply(postId) {
37 function addQuickReply(postId) {
38 var textToAdd = '[post]' + postId + '[/post]\n\n';
38 var textToAdd = '[post]' + postId + '[/post]\n';
39 var selection = window.getSelection().toString();
39 var selection = window.getSelection().toString();
40 if (selection.length > 0) {
40 if (selection.length > 0) {
41 textToAdd += '[quote]' + selection + '[/quote]\n\n';
41 textToAdd += '[quote]' + selection + '[/quote]\n';
42 }
42 }
43
43
44 var textAreaId = 'textarea';
44 var textAreaId = 'textarea';
General Comments 0
You need to be logged in to leave comments. Login now