master
Aevann1 2022-02-22 16:11:33 +02:00
parent 52dde37e63
commit 54975c6849
3 changed files with 5 additions and 5 deletions

View File

@ -198,7 +198,7 @@ def api_comment(v):
body = body.replace(i.group(0), "") body = body.replace(i.group(0), "")
choices = [] choices = []
for i in re.finditer('\s*##([^\$\n]+)##\s*', body, re.A): for i in re.finditer('\s*&&([^\$\n]+)&&\s*', body, re.A):
choices.append(i.group(1)) choices.append(i.group(1))
body = body.replace(i.group(0), "") body = body.replace(i.group(0), "")
@ -729,7 +729,7 @@ def edit_comment(cid, v):
g.db.add(c_option) g.db.add(c_option)
if not c.choices: if not c.choices:
for i in re.finditer('\s*##([^\$\n]+)##\s*', body, re.A): for i in re.finditer('\s*&&([^\$\n]+)&&\s*', body, re.A):
body = body.replace(i.group(0), "") body = body.replace(i.group(0), "")
c_choice = Comment(author_id=AUTOCHOICE_ID, c_choice = Comment(author_id=AUTOCHOICE_ID,
parent_submission=c.parent_submission, parent_submission=c.parent_submission,

View File

@ -511,7 +511,7 @@ def edit_post(pid, v):
g.db.add(c) g.db.add(c)
if not p.choices.count(): if not p.choices.count():
for i in re.finditer('\s*##([^\$\n]+)##\s*', body, re.A): for i in re.finditer('\s*&&([^\$\n]+)&&\s*', body, re.A):
body = body.replace(i.group(0), "") body = body.replace(i.group(0), "")
c = Comment(author_id=AUTOCHOICE_ID, c = Comment(author_id=AUTOCHOICE_ID,
parent_submission=p.id, parent_submission=p.id,
@ -1054,7 +1054,7 @@ def submit_post(v, sub=None):
body = body.replace(i.group(0), "") body = body.replace(i.group(0), "")
choices = [] choices = []
for i in re.finditer('\s*##([^\$\n]+)##\s*', body, re.A): for i in re.finditer('\s*&&([^\$\n]+)&&\s*', body, re.A):
choices.append(i.group(1)) choices.append(i.group(1))
body = body.replace(i.group(0), "") body = body.replace(i.group(0), "")

View File

@ -107,7 +107,7 @@ You can use Markdown formatting:
</tr> </tr>
<tr> <tr>
<td>Poll Options (can select only 1 option)</td> <td>Poll Options (can select only 1 option)</td>
<td>##bussy## ##gussy##</td> <td>&&bussy&& &&gussy&&</td>
<td> <td>
<div class="custom-control"> <div class="custom-control">
<input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338113"> <input name="choice" autocomplete="off" type="radio" class="custom-control-input" id="1338113">