Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with ".html" #1971

Closed
JJ opened this issue Apr 28, 2018 · 5 comments
Closed

Problems with ".html" #1971

JJ opened this issue Apr 28, 2018 · 5 comments

Comments

@JJ
Copy link
Contributor

JJ commented Apr 28, 2018

The problem

htmlify.p6 yields two errors, probably related to the same file:

html/syntax/.html got empty filename
@JJ
Copy link
Contributor Author

JJ commented May 1, 2018

It's generated by the '' page, or at least that is what appears in the '.html' file.

@ronaldxs
Copy link
Contributor

ronaldxs commented May 5, 2018

If you go into doc/Language/glossary.pod6 and remove the sections for =head1 Sigil and =head1 Variable then the two got empty filename errors go away.

In htmlify.p6 routine sub find-definitions(...) there is a clause:

given $subkinds {
...
    when 'variable'|'sigil'|'twigil'|'declarator'|'quote' {
        # TODO: More types of syntactic features
        %attr = :kind<syntax>,
                     :categories($subkinds),
        ;
    }
...

Most (all other?) entries from Language/glossary.pod6 are ignored but, because of the clause above, 'Sigil' and 'Variable' are added to the document registry $*DR with empty names. Later, when write-disambiguation-files tries to loop through for $*DR.grouped-by('name').kv -> $name, $p the empty name is used for the .html file.

I don't understand enough about disambiguation and what find-definitions is trying to collect in $*DR to try to fix. I looked at some of local # document lines in the local code but could not figure out enough from there and would be interested if someone knows of other helpful documentation.

@tisonkun
Copy link
Member

tisonkun commented May 5, 2018

For the sigil part, I checked https://docs.perl6.org/js/search.js and lookup https://docs.perl6.org/language/variables.html#index-entry-%21%2525_%28sigil%29

All sigil are X<>-ed manually. I'd like to remove 'sigil' from the very line, since its meaning is weird. If we want to make something searchable/indexed, use X<> as Pod6 spec.

In fact, such utils things guess users intention, huh, at least not document how it guessing. Since we have a number of contributors, unexpected issues occur due to that.

tisonkun added a commit that referenced this issue May 5, 2018
Co. #1971

> For the sigil part, I checked https://docs.perl6.org/js/search.js and lookup https://docs.perl6.org/language/variables.html#index-entry-%21%2525_%28sigil%29

> All sigil are X<>-ed manually. I'd like to remove 'sigil' from the very line, since its meaning is weird. If we want to make something searchable/indexed, use X<> as Pod6 spec.
@ronaldxs ronaldxs self-assigned this May 5, 2018
MasterDuke17 pushed a commit to MasterDuke17/doc that referenced this issue May 5, 2018
@tisonkun
Copy link
Member

tisonkun commented May 5, 2018

Oh, I just find it is about disambiguation...

@ronaldxs ronaldxs removed their assignment May 5, 2018
JJ added a commit that referenced this issue May 6, 2018
Update htmlify.p6 to fix 'got empty filename' issue #1971.
@JJ
Copy link
Contributor Author

JJ commented May 6, 2018

This was fixed by #1997 . Thanks!

@JJ JJ closed this as completed May 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants