This commit standardizes the various todos around the code a bit in a manner recognized by LDoc.
Besides drawing more attention by being displayed in the developer docs, they're also extractable with LDoc on the command line:
```sh
ldoc --tags todo,fixme *.lua
```
However, whether that particular usage offers any advantage over other search tools is questionable at best.
* and some random beautification
-- FIXME: We can't consume the return values of refreshtype by running it, because for a reason that is beyond me (scoping? gc?), that renders it useless later, meaning we then enqueue refreshes with bogus arguments...
--- @fixme We can't consume the return values of refreshtype by running it, because for a reason that is beyond me (scoping? gc?), that renders it useless later, meaning we then enqueue refreshes with bogus arguments...
-- Thankfully, we can track them in _refresh()'s logging very soon after that...
logger.dbg("setDirty via a func from widget",widgetand(widget.nameorwidget.idortostring(widget))or"nil")
end
@ -1050,7 +1050,7 @@ function UIManager:handleInput()
ifself.looperthen
logger.info("handle input in turbo I/O looper")
self.looper:add_callback(function()
-- FIXME: force close looper when there is unhandled error,
--- @fixme Force close looper when there is unhandled error,
-- otherwise the looper will hang. Any better solution?
@ -374,8 +375,8 @@ function TextBoxWidget:_renderText(start_row_idx, end_row_idx)
elseifself.alignment=="right"then
pen_x=(self.width-line.width)
end
--@todo don't use kerning for monospaced fonts. (houqp)
-- refert to cb25029dddc42693cc7aaefbe47e9bd3b7e1a750 in master tree
--- @todo don't use kerning for monospaced fonts. (houqp)
--- refer to [cb25029dddc42693cc7aaefbe47e9bd3b7e1a750](https://github.com/koreader/koreader/commit/cb25029dddc42693cc7aaefbe47e9bd3b7e1a750) in master tree
-- does not error if the directory already exists, and creates intermediate directories as needed.
-- @string path the directory to create
-- @treturn bool true on success; nil, err_message on error
functionutil.makePath(path)
path=path:gsub("/+$","")
ifutil.pathExists(path)thenreturntrueend
@ -563,18 +561,17 @@ local function replaceSlashChar(str)
end
end
--- Replaces characters that are invalid filenames.
--
-- Replaces the characters <code>\/:*?"<>|</code> with an <code>_</code>
-- unless an optional path is provided.
-- These characters are problematic on Windows filesystems. On Linux only
-- <code>/</code> poses a problem.
-- If an optional path is provided, util.getFilesystemType() will be used
-- to determine whether stricter VFAT restrictions should be applied.
--[[--
Replacescharactersthatareinvalidfilenames.
Replacesthecharacters`\/:*?"<>|` with an `_` unless an optional path is provided. These characters are problematic on Windows filesystems. On Linux only the `/` poses a problem.