Last modified: 2013-03-01 18:59:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41609, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39609 - Limit scope of title-based syntax highlighting
Limit scope of title-based syntax highlighting
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Scribunto (Other open bugs)
unspecified
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Brad Jorsch
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-24 02:38 UTC by MZMcBride
Modified: 2013-03-01 18:59 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2012-08-24 02:38:24 UTC
Currently any page in the Module namespace has its full contents syntax highlighted. This is problematic as it makes hyperlinking impossible. Every page in the Module namespace becomes a dead-end page! This is bad.

There has to be some support for including working (i.e., parsed and rendered) wikitext in Module pages, in some form. I've come up with three different ideas for doing so. There may be better ideas, but these are a starting point for thought and discussion.

(1) Explicitly define non-script areas, similar to how templates have a <noinclude> area. You could add some markup such as a horizontal rule ("----") or something where text in those sections is not treated as part of the scripting language (code) and is instead run through the standard MediaWiki parser.

(2) Implicitly define non-script areas. This would rely on magic transclusion, for example Module:Foo would have an implicit transclusion of Module:Foo/Header and Module:Foo/Footer, allowing users to add categories and introductory text in subpages, but not mess with the Module:Foo page itself.

(3) Create a linking hybrid, where links are clickable and get properly inserted into link-trakcing tables, but do not alter how the code reads. This would be similar to Bugzilla's current linking behavior in a lot of ways. This is my least favorite option.
Comment 1 Tim Starling 2012-09-06 05:06:38 UTC
Pretty much the same problem as bug 10410. Maybe even a duplicate?
Comment 2 Phil Boswell 2012-09-07 13:08:21 UTC
If I'm understanding this correctly, the wish is for text formatted like [[this (not forgetting the possible)|pipe trick]] to be rendered as wikilinks within LUA comments…and the discussion at bug 10410 suggests that this might be something desirable in other languages also.

My on-topic reaction is that one way of constructing comments in LUA involves doubled square brackets (with or without contained equals signs [[like this]] or [=[like this]=]) which would mean that at least some perfectly-valid comments in LUA would be made into wikilinks in error.

My off-topic reaction is to wonder whether it would be possible to insert a callback hook into the Syntax Highlighter module to optionally pass comments through a wikitext parser…which is a discussion for elsewhere so I'll stop there.
Comment 3 Yannick Perret 2013-02-02 22:22:07 UTC
I +1 this idea (and I wrote mostly the same in one Lua discussion page).

This should be useful for several this.
The main in my opinion is the possibility to put modules in categories (the wikipedia I know all have templates in thematic categories).
It is also useful to at least have a link to wikified module documentation.

I prefer the #2 way if this feature is added. It is similar to the convention of using /Doc (/Documentation on fr:) subpage for templates.

Regards,
--
Y.
Comment 4 Helder 2013-02-20 15:52:51 UTC
About /doc subpages, see also [[mw:Extension talk:Scribunto/Documentation specification]].
Comment 5 kipod 2013-02-20 17:00:24 UTC
Personally, i'm happy to keep the situation as is (i.e., no direct link from the script to its docs), and treat the talk pages in the Module: namespace as the proper place for documentation. 

if "real" talkpage is needed (i.e., somewhere to discuss the module, in contrast with somewhere to document it), a subpage of the "main" talkpage can be used, and be linked from the doc.

so in a nutshell:

[[Module:Foo]]  (the Lua script - and maybe, in some future, a non-lua script)
[[Module talk:Foo]] (the documentation page)
[[Module talk:Foo/Discussion]] (somewhere to discuss the script. 
		linked from [[Module talk:Foo]])

embedding links to the documentation inside comments in the script seems both complicated and dangerous, and when a seldom-used text page (IOW, the talkpage of the module) is only a mouseclick away, it seems like the wrong thing to do.

peace.
Comment 6 Helder 2013-02-20 17:39:26 UTC
(In reply to comment #5)
> so in a nutshell:
> 
> [[Module:Foo]]  (the Lua script - and maybe, in some future, a non-lua
> script)
> [[Module talk:Foo]] (the documentation page)
> [[Module talk:Foo/Discussion]] (somewhere to discuss the script. 
>         linked from [[Module talk:Foo]])

This would cause comments about the module not to appear in my WatchList if I'm just watching the module. The discussion has to happen in the talk page,  [[Module talk:Foo]].
Comment 7 MZMcBride 2013-02-22 02:29:09 UTC
(In reply to comment #4)
> About /doc subpages, see also [[mw:Extension talk:Scribunto/Documentation
> specification]].

It seems Anomie proposed this in <https://gerrit.wikimedia.org/r/50143>.
Comment 8 Brad Jorsch 2013-03-01 18:59:53 UTC
Since Gerrit change #50143 is merged, which allows for wikitext documentation of modules, let's mark this fixed.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links