Merge pull request #2299 from myk002/myk_die_easter_egg

[helpdb] replace die's underline with tombstones
develop
Myk 2022-09-23 08:45:43 -07:00 committed by GitHub
commit b8a172440f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 61 deletions

@ -321,6 +321,8 @@ local function scan_builtins(old_db)
HELP_SOURCES.RENDERED or HELP_SOURCES.STUB,
{entry_types=entry_types})
end
-- easter egg: replace underline for 'die' help with tombstones
textdb.die.long_help = textdb.die.long_help:gsub('=', string.char(239))
end
-- scan for enableable plugins and plugin-provided commands and add their help

@ -42,10 +42,7 @@ local files = {
['hack/docs/docs/Tags.txt']=[[
* fort: Tools that are useful while in fort mode.
* armok: Tools that give you complete control over
an aspect of the game or provide access to
information that the game intentionally keeps
hidden.
* armok: Tools that give you complete control over an aspect of the game or provide access to information that the game intentionally keeps hidden.
* map: Tools that interact with the game map.
@ -55,18 +52,17 @@ local files = {
]],
['hack/docs/docs/tools/hascommands.txt']=[[
hascommands
***********
===========
**Tags:** fort | armok | units
Tags: fort | armok | units
Documented a plugin that
has commands.
Documented a plugin that has commands.
**Command:** "boxbinders"
Command: "boxbinders"
Documented boxbinders.
**Command:** "bindboxers"
Command: "bindboxers"
Documented bindboxers.
@ -74,12 +70,11 @@ Documented full help.
]],
['hack/docs/docs/tools/samename.txt']=[[
samename
********
========
**Tags:** fort | armok
| units
Tags: fort | armok | units
**Command:** "samename"
Command: "samename"
Documented samename.
@ -87,10 +82,9 @@ Documented full help.
]],
['hack/docs/docs/tools/nocommand.txt']=[[
nocommand
*********
=========
**Tags:** fort | armok |
units
Tags: fort | armok | units
Documented nocommand.
@ -98,11 +92,11 @@ Documented full help.
]],
['hack/docs/docs/tools/basic.txt']=[[
basic
*****
=====
**Tags:** map
Tags: map
**Command:** "basic"
Command: "basic"
Documented basic.
@ -110,11 +104,11 @@ Documented full help.
]],
['hack/docs/docs/tools/subdir/scriptname.txt']=[[
subdir/scriptname
*****************
=================
**Tags:** map
Tags: map
**Command:** "subdir/scriptname"
Command: "subdir/scriptname"
Documented subdir/scriptname.
@ -126,9 +120,9 @@ Documented full help.
basic
=====
**Tags:** map
Tags: map
**Command:** "basic"
Command: "basic"
in-file basic.
@ -142,9 +136,9 @@ script contents
subdir/scriptname
=================
**Tags:** map
Tags: map
**Command:** "subdir/scriptname"
Command: "subdir/scriptname"
in-file scriptname.
@ -158,9 +152,9 @@ script contents
inscript_docs
=============
**Tags:** map | badtag
Tags: map | badtag
**Command:** "inscript_docs"
Command: "inscript_docs"
in-file inscript_docs.
@ -182,9 +176,9 @@ script contents
basic
=====
**Tags:** map
Tags: map
**Command:** "basic"
Command: "basic"
in-file basic (other).
@ -198,9 +192,9 @@ script contents
subdir/scriptname
=================
**Tags:** map
Tags: map
**Command:** "subdir/scriptname"
Command: "subdir/scriptname"
in-file scriptname (other).
@ -214,9 +208,9 @@ script contents
inscript_docs
=============
**Tags:** map
Tags: map
**Command:** "inscript_docs"
Command: "inscript_docs"
in-file inscript_docs (other).
@ -400,11 +394,11 @@ end
function test.get_entry_long_help()
local expected = [[
basic
*****
=====
**Tags:** map
Tags: map
**Command:**
Command:
"basic"
Documented
@ -432,34 +426,34 @@ full help.
-- plugins/commands that have no doc files get the default template
expect.eq([[ls
**
==
No help available.
]], h.get_entry_long_help('ls'))
expect.eq([[nodocs_hascommands
******************
==================
No help available.
]], h.get_entry_long_help('nodocs_hascommands'))
expect.eq([[nodocs_hascommands
******************
==================
No help available.
]], h.get_entry_long_help('nodoc_command'))
expect.eq([[Nodocs samename.
This command has the same name as its host plugin but no rst docs.]], h.get_entry_long_help('nodocs_samename'))
expect.eq([[nodocs_nocommand
****************
================
No help available.
]], h.get_entry_long_help('nodocs_nocommand'))
expect.eq([[nodocs_script
*************
=============
No help available.
]], h.get_entry_long_help('nodocs_script'))
expect.eq([[inscript_short_only
*******************
===================
No help available.
]], h.get_entry_long_help('inscript_short_only'))
@ -468,9 +462,9 @@ No help available.
expect.eq([[inscript_docs
=============
**Tags:** map | badtag
Tags: map | badtag
**Command:** "inscript_docs"
Command: "inscript_docs"
in-file inscript_docs.