From d5eb2b7fedb80444d8c730ed1a1f2e4f76405945 Mon Sep 17 00:00:00 2001 From: mikomyazaki <47489928+mikomyazaki@users.noreply.github.com> Date: Wed, 23 Feb 2022 11:46:59 +0000 Subject: [PATCH] pencode2html and html2pencode procs are now symmetrical. (#13256) --- code/_helpers/text.dm | 27 ++++++++++++++++++++++----- html/changelogs/pencode2html.yml | 6 ++++++ 2 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 html/changelogs/pencode2html.yml diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm index 106673334d7..d6ed871dd42 100644 --- a/code/_helpers/text.dm +++ b/code/_helpers/text.dm @@ -569,15 +569,32 @@ t = replacetext(t, "", "\[/i\]") t = replacetext(t, "", "\[u\]") t = replacetext(t, "", "\[/u\]") - t = replacetext(t, "
", "\[br\]") - t = replacetext(t, "
", "\[hr\]") - t = replacetext(t, "", "\[/list\]") - t = replacetext(t, "
  • ", "\[*\]") t = replacetext(t, "", "\[large\]") t = replacetext(t, "", "\[/large\]") t = replacetext(t, "", "\[small\]") t = replacetext(t, "", "\[/small\]") + t = replacetext(t, current_map.station_name, "\[station\]") + t = replacetext(t, "
    ", "\n") + t = replacetext(t, "
    ", "\[center\]") + t = replacetext(t, "
    ", "\[/center\]") + t = replacetext(t, "
    ", "\[br\]") + t = replacetext(t, "", "\[field\]") + t = replacetext(t, "

    ", "\[h1\]") + t = replacetext(t, "

    ", "\[/h1\]") + t = replacetext(t, "

    ", "\[h2\]") + t = replacetext(t, "

    ", "\[/h2\]") + t = replacetext(t, "

    ", "\[h3\]") + t = replacetext(t, "

    ", "\[/h3\]") + t = replacetext(t, "
  • ", "\[*\]") + t = replacetext(t, "
    ", "\[hr\]") + t = replacetext(t, "", "\[/list\]") + t = replacetext(t, "", "\[table\]") + t = replacetext(t, "
    ", "\[/table\]") + t = replacetext(t, "", "\[grid\]") + t = replacetext(t, "
    ", "\[/grid\]") + t = replacetext(t, "", "\[row\]") + t = replacetext(t, "", "\[cell\]") if(include_images) t = replacetext(t, "", "\[logo_scc\]") diff --git a/html/changelogs/pencode2html.yml b/html/changelogs/pencode2html.yml new file mode 100644 index 00000000000..7073857000d --- /dev/null +++ b/html/changelogs/pencode2html.yml @@ -0,0 +1,6 @@ +author: mikomyazaki + +delete-after: True + +changes: + - bugfix: "Converting from pencode to html (e.g. in the holomenu) will now properly convert center, heading, tables, lists, and more."