Ver código fonte

Strip code, like wikilinks, from case titles in the chart.

pull/9/head
Ben Kurtovic 11 anos atrás
pai
commit
1bc7606b1d
1 arquivos alterados com 2 adições e 0 exclusões
  1. +2
    -0
      tasks/drn_clerkbot.py

+ 2
- 0
tasks/drn_clerkbot.py Ver arquivo

@@ -26,6 +26,7 @@ import re
from threading import RLock
from time import mktime, sleep, time

from mwparserfromhell import parse as mw_parse
import oursql

from earwigbot import exceptions
@@ -713,6 +714,7 @@ class DRNClerkBot(Task):
case["volunteer_sortkey"] = int(mktime(case["case_volunteer_time"].timetuple()))
data += "|mu={case_modify_user}|ms={modify_sortkey}|mt={modify_time}"

case["case_title"] = mw_parse(case["case_title"]).strip_code()
title = case["case_title"].replace("_", " ").replace("|", "|")
case["title"] = title[:47] + "..." if len(title) > 50 else title
case["file_time"] = self.format_time(case["case_file_time"])


Carregando…
Cancelar
Salvar