bjorn 1 year ago
parent
commit
459a95d60c
6 changed files with 28 additions and 11 deletions
  1. 2 2
      api/init.lua
  2. 1 1
      api/lovr/enet/init.lua
  3. 1 1
      api/lovr/http/init.lua
  4. 3 7
      api/lovr/init.lua
  5. 18 0
      api/lovr/utf8/init.lua
  6. 3 0
      main.lua

File diff suppressed because it is too large
+ 2 - 2
api/init.lua


+ 1 - 1
api/lovr/enet/init.lua

@@ -1,5 +1,5 @@
 return {
 return {
-  tag = 'plugins',
+  tag = 'libraries',
   summary = 'UDP networking library.',
   summary = 'UDP networking library.',
   description = [[
   description = [[
     ENet is a UDP networking plugin bundled with LÖVR that can be used for networking and
     ENet is a UDP networking plugin bundled with LÖVR that can be used for networking and

+ 1 - 1
api/lovr/http/init.lua

@@ -1,5 +1,5 @@
 return {
 return {
-  tag = 'plugins',
+  tag = 'libraries',
   summary = 'HTTP(S) requests.',
   summary = 'HTTP(S) requests.',
   description = [[
   description = [[
     The [lovr-http](https://github.com/bjornbytes/lovr-http) plugin performs HTTP requests.
     The [lovr-http](https://github.com/bjornbytes/lovr-http) plugin performs HTTP requests.

+ 3 - 7
api/lovr/init.lua

@@ -31,13 +31,9 @@ return {
       description = 'This function can be used to get the current version of LÖVR.'
       description = 'This function can be used to get the current version of LÖVR.'
     },
     },
     {
     {
-      name = 'Plugins',
-      tag = 'plugins',
-      description = [[
-        LÖVR bundles a few plugins by default.  These are distributed as libraries next to the
-        executable, and if desired they can be safely deleted without messing anything up.  More
-        plugins can be added, see the <a data-key="Plugins">Plugins</a> page for details.
-      ]]
+      name = 'Libraries',
+      tag = 'libraries',
+      description = 'LÖVR bundles a few third-party modules by default.'
     }
     }
   }
   }
 }
 }

+ 18 - 0
api/lovr/utf8/init.lua

@@ -0,0 +1,18 @@
+return {
+  tag = 'libraries',
+  summary = 'UTF-8 string processing.',
+  description = [[
+    The `utf8` module is from Lua 5.3.  LÖVR includes it on previous Lua versions to make it easier
+    to work with multi-byte characters that are outside the ASCII range.
+
+    See the [Lua reference manual](https://www.lua.org/manual/5.3/manual.html#6.5) for
+    documentation.
+  ]],
+  example = [[
+    local utf8 = require 'utf8'
+
+    local str = 'LÖVR'
+    print(string.len(str)) --> prints 5, because Ö takes up 2 bytes
+    print(utf8.len(str))   --> prints 4
+  ]]
+}

+ 3 - 0
main.lua

@@ -0,0 +1,3 @@
+local str = 'LÖVR'
+print(#str)
+print(require('utf8').len(str))

Some files were not shown because too many files changed in this diff