Help talk:Wikitext
Add topic| This is the talk page for discussing improvements to the Wikitext page. |
|
| Archives: 1, 2Auto-archiving period: 3 months |
| This help page does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||
| |||||||||||
| Text or other creative content from this version of Help:Editing was copied or moved into Help:Wikitext with this edit. The former page's history now serves to provide attribution for that content in the latter page, and it must not be deleted as long as the latter page exists. |
Purging the cache of Wikipedia:WikiProject Law
[edit]The main page and right side panel of Wikipedia:WikiProject Law are no longer updating. Can somebody please check this out. It's been annoying me for weeks. Thanks in advance. Bearian (talk) 12:08, 29 January 2026 (UTC)
Where is the documentation for Search and Replace feature?
[edit]One top right up by the Preview button there is a Search and Replace button. I can't get the RegExp feature to work. Any docs? Thanks Johnjbarton (talk) 03:16, 8 March 2026 (UTC)
- @Johnjbarton: See Wikipedia:AutoWikiBrowser/Regular expression. Fabrickator (talk) 03:40, 8 March 2026 (UTC)
- Yes, I gave up on the popup button and succeeded with the JS AWB, thanks. I just thought the popup version would be faster for one article. Oh well. Johnjbarton (talk) 03:48, 8 March 2026 (UTC)
- My recollection is that it uses JS syntax for regexen. -- Shmuel (Seymour J.) Metz Username:Chatul (talk) 13:18, 9 March 2026 (UTC)
- That is what I assumed. It just did not work. Maybe the escape processing between the UI and triggering the regex? But I couldn't even figure out if this was an editor thing or an addon or what. It seems to be undocumented. I ignored it before, so again. Johnjbarton (talk) 15:23, 9 March 2026 (UTC)
- Works for me. Do you have an example of a case which fails? Danbloch (talk) 21:06, 10 March 2026 (UTC)
- Well of course when go to give you steps to reproduce it works! Nevertheless my question was about the docs. If I had found docs I may have figured out how to get it to work. Johnjbarton (talk) 21:19, 10 March 2026 (UTC)
- Works for me. Do you have an example of a case which fails? Danbloch (talk) 21:06, 10 March 2026 (UTC)
- That is what I assumed. It just did not work. Maybe the escape processing between the UI and triggering the regex? But I couldn't even figure out if this was an editor thing or an addon or what. It seems to be undocumented. I ignored it before, so again. Johnjbarton (talk) 15:23, 9 March 2026 (UTC)
<samp> usage revert
[edit]@Mathglot: I saw you reverted my change to the mention of the "[edit]" link from using <code> to using <samp>; however, I do believe <samp> is correct here. The HTML Standard (quoted here under its CC BY 4.0 license) says "the <code> element represents a fragment of computer code. This could be an XML element name, a filename, a computer program, or any other string that a computer would recognize", whereas "the samp element represents sample or quoted output from another program or computing system" (HTML Standard § The code element; § The samp element); since "[edit]" is not code in that sense, only <samp> applies – after all, it is quoted output from MediaWiki.
(I also believe your revert of me on Help:Introduction to editing with Wiki Markup/1 was incorrect; that use of <kbd><samp> is valid per HTML Standard § The kbd element. Your other reverts are probably correct, though, because I apparently didn't realize {{Button}} already included <kbd> semantics lol)
{{Lemondoge|Talk|Contributions}} 13:21, 24 August 2026 (UTC)
- I believe that the use of <samp> was incorrect for the "[edit]" link. This link is in no way a few lines of sample output showing what a computer program or algorithm is capable of, by way of giving users an idea of the tail half of the input⟶output paradigm. It has nothing to do with algorithmic output at all; it's just a link, and it happens to be in a font that looks like what various measures at Wikipedia (including some supported Html tags) can emit. (You could also argue that <code> is incorrect here, but it is used so extensively in Wikipedia documentation for various formatting purposes where it shouldn't, that you'd probably would need a widely attended Rfc at a centralized venue to overturn it. I'm open to that approach if you want to go there, but it seems Sisyphean; bravo if you want to take that on!) However, this is not the case with <samp>, and as "[edit]" is not a sample of anything, <samp> is the wrong choice here. Thanks, Mathglot (talk) 17:50, 24 August 2026 (UTC)
<samp>is not necessarily for "algorithmic" output; HTML Standard § Thekbdelement shows it can be used even for just buttons displayed on screen in conjunction with<kbd>("...and thesampelements inside them indicating that the steps are input based on something being displayed by the system, in this case menu labels..."). {{Lemondoge|Talk|Contributions}} 14:25, 25 August 2026 (UTC)- Honestly, I think you are getting confused, probably from using that source which I find very opaque and inscrutable. If you stick to W3C or popular sites that do a good job of explaining them, it's a lot easier. Kbd ('keyboard') is typically used for something the user types (or might type) in. Code ('computer code') is used mostly for snippets of actual program code written by a programmer (widely flouted at Wikipedia), and program-related stuff like filenames. Samp is used for the output of a program, like automated responses, error messages, and so on. It isn't typically used for rendering a link on a page in monospace font. From the W3C:
The
sampElement: Represents "(sample) output from a program or computing system".
<p>The computer said <samp>Too much cheese in tray two</samp> but I didn't know what that meant.</p>
- Thanks, Mathglot (talk) 18:13, 25 August 2026 (UTC)
- The W3C's spec is outdated and obsolete (last updated August 2011); it's been replaced by WHATWG's standard that I was linking. WHATWG is the current sole publisher of the HTML standard, as announced by the W3C in 2019.
- From what I've read (HTML Standard and elsewhere), it seems to me
<samp>...</samp>is pretty general – to be used anytime you want to say "hey, this is something the system shows you", even if it does not correspond to any particular input from the user. And "[edit]" seems to be exactly that – something that is being shown to the user by the system. {{Lemondoge|Talk|Contributions}} 19:12, 25 August 2026 (UTC)
- Honestly, I think you are getting confused, probably from using that source which I find very opaque and inscrutable. If you stick to W3C or popular sites that do a good job of explaining them, it's a lot easier. Kbd ('keyboard') is typically used for something the user types (or might type) in. Code ('computer code') is used mostly for snippets of actual program code written by a programmer (widely flouted at Wikipedia), and program-related stuff like filenames. Samp is used for the output of a program, like automated responses, error messages, and so on. It isn't typically used for rendering a link on a page in monospace font. From the W3C:
Add link to {{'}} and {{`}} in italic and bold text formatting section
[edit]As in the title. Probably useful (alternatives including ' and ') ~2026-46906-57 (talk) 10:00, 5 September 2026 (UTC)