2
0
Эх сурвалжийг харах

Fix the markdown generation for notices;

bjorn 2 сар өмнө
parent
commit
e4c4def478
2 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 1 1
      api/init.lua
  2. 2 2
      api/main.lua

+ 1 - 1
api/init.lua

@@ -4,7 +4,7 @@ return {
       name = "conf",
       tag = "callbacks",
       summary = "Called to read configuration settings at startup.",
-      description = "The `lovr.conf` callback lets you configure default settings for LÖVR.  It is called once right before the game starts.\n\n:::note Make sure you put `lovr.conf` in a file called `conf.lua`, a special file that's loaded before the rest of the framework initializes. :::",
+      description = "The `lovr.conf` callback lets you configure default settings for LÖVR.  It is called once right before the game starts.\n\n:::note\nMake sure you put `lovr.conf` in a file called `conf.lua`, a special file that's loaded before the rest of the framework initializes.\n:::",
       key = "lovr.conf",
       module = "lovr",
       examples = {

+ 2 - 2
api/main.lua

@@ -25,8 +25,8 @@ end
 local function unwrap(str)
   if not str then return str end
   str = unindent(str)
-  return str:gsub('([^\n])\n(%S)', function(a, b)
-    if b == '-' or b == '>' then
+  return str:gsub('([^\n]+)\n(%S)', function(a, b)
+    if b == '-' or b == '>' or b == ':' or a:match(':::') then
       return a .. '\n' .. b
     else
       return a .. ' ' .. b