Sublime Forum

HyperHelpAuthor - Linting problem

#1

When running the linter I cannot get rid of the following warning:

Linting in help package: User

hyperhelp.json:
    warning @ 1:1     Topic 'other2.txt' appears in the index but not in 'OTHER2.txt'

This is my hyperhelp.json:

{
    "package": "User",
    "description": "Help for User Package",
    "doc_root": "help/",

    "help_files": {
        "index.txt": [
            "Index file for User package",
            {
                "topic": "index.txt",
                "caption": "Index file",
                "aliases": ["index file"]
            }
        ],
        "sample.txt": [
            "Sample File",
        ],
        "other1.txt": [
            "Other One"
        ],
        "OTHER2.txt": [
            "Other Two",
        ]
    },
    "help_contents": [
        "index.txt",
    ]
}

This is my OTHER2.txt:

%hyperhelp title="Other Two" date="2020-02-21"

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

The same warning does not happen for other1.txt. They are essentially identical except the filename is lowercase in the former and uppercase in the latter.

How can I fix the warning?

0 Likes

#4

I had to create the topic *OTHER2.txt* in the file OTHER2.txt. How can I create an alias for it so it appears as OTHER2?

0 Likes

#5

I haven’t investigated too deeply as of yet, but I think this is an issue with something that the Linter itself is doing. Topics are supposed to be case-insensitive (|OTHER2.txt| and |other2.txt| both work, for example) so I suspect that the linter is not correctly case-folding when it looks up anchors in the file.

If you try to create an alias for it under the appropriate topic, you’ll generate an extra warning instead about the topic already existing, so that’s not going to resolve the problem.

As such there’s not really a way to resolve this at the moment other than changing the case of the filename, which is sub-optimal since users should be free to name files however they please.

I’d recommend filing an issue for that, but I also noticed a couple of issues while testing this that I want to create issues for so I don’t forget about them, so I’ll do that and try to carve out some time to push out a bugfix release.

1 Like