diff options
author | madmaxoft <github@xoft.cz> | 2013-10-18 21:02:43 +0200 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2013-10-18 21:02:43 +0200 |
commit | db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6 (patch) | |
tree | a5f736a8a067098dbc4ea7b6b2b836b309389730 /MCServer/Plugins/APIDump/main.lua | |
parent | APIDump: Do not list empty Constants or Functions sections. (diff) | |
download | cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.tar cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.tar.gz cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.tar.bz2 cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.tar.lz cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.tar.xz cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.tar.zst cuberite-db2d4aa4e38ebf0a381f2ed13d8c26e30c79b4e6.zip |
Diffstat (limited to 'MCServer/Plugins/APIDump/main.lua')
-rw-r--r-- | MCServer/Plugins/APIDump/main.lua | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/MCServer/Plugins/APIDump/main.lua b/MCServer/Plugins/APIDump/main.lua index eadea622b..6d85a1281 100644 --- a/MCServer/Plugins/APIDump/main.lua +++ b/MCServer/Plugins/APIDump/main.lua @@ -295,19 +295,10 @@ function DumpAPIHtml() </html>]]); f:close(); - -- Copy the CSS file to the output folder (overwrite any existing): - cssf = io.open("API/main.css", "w"); - if (cssf ~= nil) then - cssfi = io.open(g_Plugin:GetLocalDirectory() .. "/main.css", "r"); - if (cssfi ~= nil) then - local CSS = cssfi:read("*all"); - cssf:write(CSS); - cssfi:close(); - end - cssf:close(); - end - - cFile:Copy(g_Plugin:GetLocalDirectory() .. "/run_prettify.js", "API/run_prettify.js"); + -- Copy the static files to the output folder (overwrite any existing): + cFile:Copy(g_Plugin:GetLocalFolder() .. "/main.css", "API/main.css"); + cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.js", "API/prettify.js"); + cFile:Copy(g_Plugin:GetLocalFolder() .. "/prettify.css", "API/prettify.css"); cFile:Copy(g_Plugin:GetLocalFolder() .. "/lang-lua.js", "API/lang-lua.js"); -- List the documentation problems: @@ -678,7 +669,8 @@ function WriteHtmlClass(a_ClassAPI, a_AllAPI) <head> <title>MCServer API - ]] .. a_ClassAPI.Name .. [[ Class</title> <link rel="stylesheet" type="text/css" href="main.css" /> - <script src="run_prettify.js"></script> + <link rel="stylesheet" type="text/css" href="prettify.css" /> + <script src="prettify.js"></script> <script src="lang-lua.js"></script> </head> <body> @@ -793,7 +785,8 @@ function WriteHtmlHook(a_Hook) <head> <title>MCServer API - ]] .. HookName .. [[ Hook</title> <link rel="stylesheet" type="text/css" href="main.css" /> - <script src="run_prettify.js"></script> + <link rel="stylesheet" type="text/css" href="prettify.css" /> + <script src="prettify.js"></script> <script src="lang-lua.js"></script> </head> <body> |