Merge pull request #4115 from myk002/myk_utf8help

treat doc sources as utf-8
develop
Myk 2023-12-31 11:33:57 -08:00 committed by GitHub
commit 01c8d04c0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

@ -64,6 +64,7 @@ Template for new versions:
- wherever units are listed in DFHack tools, properties like "agitated" or (-trained-) are now shown
## Documentation
- UTF-8 text in tool docs is now properly displayed in-game in `gui/launcher` (assuming that it can be converted to cp-437)
## API

@ -138,6 +138,7 @@ local function update_entry(entry, iterator, opts)
local tags_found, short_help_found = false, opts.skip_short_help
local in_tags, in_short_help = false, false
for line in iterator do
line = dfhack.utf2df(line)
if not short_help_found and first_line_is_short_help then
line = line:trim()
local _,_,text = line:find('^'..first_line_is_short_help..'%s*(.*)')