diff options
author | madmaxoft <github@xoft.cz> | 2014-01-04 19:23:21 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-01-04 19:24:39 +0100 |
commit | 58e18b41f7340c6cf2f7e8df5a35758a9e8f5534 (patch) | |
tree | 02f05bd99dbf6ad6ea0b5307fa5339c03c73ba8d /MCServer/Plugins | |
parent | added supported protocol (diff) | |
download | cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.tar cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.tar.gz cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.tar.bz2 cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.tar.lz cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.tar.xz cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.tar.zst cuberite-58e18b41f7340c6cf2f7e8df5a35758a9e8f5534.zip |
Diffstat (limited to 'MCServer/Plugins')
-rw-r--r-- | MCServer/Plugins/InfoDump.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/MCServer/Plugins/InfoDump.lua b/MCServer/Plugins/InfoDump.lua index d505eb428..1b27abef4 100644 --- a/MCServer/Plugins/InfoDump.lua +++ b/MCServer/Plugins/InfoDump.lua @@ -53,12 +53,17 @@ lfs = require("lfs"); local function ForumizeString(a_Str) assert(type(a_Str) == "string"); - -- Replace line ends with {%p} when multiple and space when single, so that manual word-wrap in the Info.lua file is fixed + -- Replace multiple line ends with {%p} and single line ends with a space, + -- so that manual word-wrap in the Info.lua file doesn't wrap in the forum a_Str = a_Str:gsub("\n\n", "{%%p}"); a_Str = a_Str:gsub("\n", " "); -- Replace the generic formatting: a_Str = a_Str:gsub("{%%p}", "\n\n"); + a_Str = a_Str:gsub("{%%b}", "[b]"):gsub("{%%/b}", "[/b]"); + a_Str = a_Str:gsub("{%%i}", "[i]"):gsub("{%%/i}", "[/i]"); + a_Str = a_Str:gsub("{%%list}", "[list]"):gsub("{%%/list}", "[/list]"); + a_Str = a_Str:gsub("{%%li}", "[*]"):gsub("{%%/li}", ""); -- TODO: Other formatting return a_Str; |