Paper markdown (#30873)

* why it doesn't work

* list thing

* oops

* fixes list. maybe

* Less regex

* wip

* Done I think. I think

* return your functions

* Replace $10 by $a
This commit is contained in:
nicbn
2017-09-30 10:08:25 -03:00
committed by CitadelStationBot
parent fceb289072
commit 078128aa91
5 changed files with 176 additions and 75 deletions
@@ -170,12 +170,19 @@
t = replacetext(t, "\[td\]", "<td>")
t = replacetext(t, "\[cell\]", "<td>")
t = replacetext(t, "\[tab\]", "&nbsp;&nbsp;&nbsp;&nbsp;")
t = parsemarkdown_basic(t)
return t
/datum/computer_file/program/filemanager/proc/prepare_printjob(t) // Additional stuff to parse if we want to print it and make a happy Head of Personnel. Forms FTW.
t = replacetext(t, "\[field\]", "<span class=\"paper_field\"></span>")
t = replacetext(t, "\[sign\]", "<span class=\"paper_field\"></span>")
t = parse_tags(t)
t = replacetext(t, regex("(?:%s(?:ign)|%f(?:ield))(?=\\s|$)", "ig"), "<span class=\"paper_field\"></span>")
return t
/datum/computer_file/program/filemanager/ui_data(mob/user)