doc icon indicating copy to clipboard operation
doc copied to clipboard

Linking to pragmas

Open AlexDaniel opened this issue 8 years ago • 4 comments

Some time ago I attempted to add a link to MONKEY-SEE-NO-EVAL.

It created this link: https://docs.perl6.org/type/MONKEY-SEE-NO-EVAL (404)

But I needed this: https://docs.perl6.org/language/pragmas#index-entry-MONKEY-SEE-NO-EVAL-MONKEY-SEE-NO-EVAL

Is there any better way than hardcoding language/pragmas#index-entry-MONKEY-SEE-NO-EVAL-MONKEY-SEE-NO-EVAL?

AlexDaniel avatar Sep 02 '17 00:09 AlexDaniel

It's because our htmlify.p6 treat Upper as Type and lower as routine.

You can modify htmlify logic(it's a bit messy though, remind of 'write-only' :-( ) or improve the #index-entry-MONKEY-SEE-NO-EVAL-MONKEY-SEE-NO-EVAL part to make hard-code not so ugly.

tisonkun avatar Dec 10 '17 12:12 tisonkun

Wow, it's a thousand lines of early Perl6... Maybe use this to refactor the thing? Without global variables, for instance?

JJ avatar Feb 10 '18 09:02 JJ

Besides, I think this would call for major refactoring. Would pragmas go to a separate directory? This is related to #802 and others, also. Should we document pragmas in a separate directory?

JJ avatar Feb 10 '18 09:02 JJ

Related: #1823

JJ avatar Mar 25 '18 21:03 JJ

htmlify is long gone, but the best way to link to that these days is:

L</language/pragmas#MONKEY-SEE-NO-EVAL>

coke avatar May 24 '24 02:05 coke