Module talk:Excerpt

(Redirected from Template talk:Transclude linked excerpt)
Latest comment: 1 day ago by Anomalocaris in topic Strange missing end tag for bold

Template-protected edit request on 27 August 2024 don't excerpt shortcuts

edit
'[Aa]nchor',
+
'[Aa]nchor', '[Ss]hc?', '[Ss]hort', '[Ss]hortcut' '[Ss]horthand', '[Pp]olicy shortcut'

These additional templates are as problematic as {{anchor}}. Excerpting them misinforms because the shortcuts redirect to the original page. Also, {{shortcut}} has a built-in {{anchor}}. The use case is essays like [1]. 142.113.140.146 (talk) 04:54, 27 August 2024 (UTC)Reply

Unlike anchors, those elements are designed to be seen, looks like there is already an option to not show them as was done in the example above. — xaosflux Talk 12:44, 27 August 2024 (UTC)Reply
Yes, I had to set the manual option |templates=-policy shortcut. But Module:Excerpt/config is about defaults, and I claim that there is no use case that wants to show these elements while excerpting. 142.113.140.146 (talk) 15:47, 27 August 2024 (UTC)Reply
  Not done for now: please establish a consensus for this alteration before using the {{Edit template-protected}} template. --Ahecht (TALK
PAGE
)
14:45, 27 September 2024 (UTC)Reply

Transclude lead excerpt doesn't recognize imagemaps

edit

See User:Queen of Hearts/D#Passports; {{transclude lead excerpt}} fails to show the lead of User:Queen of Hearts/Drafts/List of passports, which begins with an WP:Imagemap. Thanks, Queen of Hearts (talk) 05:25, 7 September 2024 (UTC)Reply

Italic title issue

edit

The blacklist at Module:Excerpt/config currently does not filter out {{Italic}}, which redirects to {{Italic title}}. This led to Criminal law in the United States being italicized because it excerpted Res gestae which (until just now) transcluded {{Italic}}. -- Visviva (talk) 19:28, 15 September 2024 (UTC)Reply

After a bit of fiddling I found it also does not filter out {{Italics title}} -- Brit milah was causing Religion and circumcision to italicize and I could not for the life of me figure out why. wound theology 02:48, 14 November 2024 (UTC)Reply

displaytitle and sections

edit

I believe parameter "displaytitle" should not be appended with the section. For example, {{excerpt|Tectonics on icy moons|Plate tectonics}} should render as "This section is an excerpt from Plate tectonics on icy moons."; currently, it's rendered as "This section is an excerpt from Plate tectonics on icy moons § Plate tectonics." fgnievinski (talk) 01:47, 19 October 2024 (UTC)Reply

images in infobox building

edit

It seems images in template:Infobox building are causing some difficulties; could somebody more knowledgeable take a look at this draft section, please? the problem appears at "File:1; |thumb|". thanks! fgnievinski (talk) 05:46, 22 October 2024 (UTC)Reply

That article was drastically misusing {{Infobox building}}. I fixed it to use a normal multiple image template instead. – Jonesey95 (talk) 19:31, 22 October 2024 (UTC)Reply
thank you! fgnievinski (talk) 01:40, 23 October 2024 (UTC)Reply

Excerpt misses <p>...</p> in last paragraph

edit

I have been trying to fix a bug in scripts that are not able to detect excerpts (namely, User:Caorongjin/wordcount and Wikipedia:Prosesize). However, there seems to be a bug in the Module:Excerpt. Namely, I see the <div>...</div> that has the classname of "excerpt"; but all the paragraphs with the exceptions of the last paragraph are wrapped in <p>...</p>. See for example Enhanced oil recovery#Greenhouse gas emissions. —Caorongjin 💬 21:44, 29 October 2024 (UTC)Reply

Strange missing end tag for bold

edit

To fix a missing end tag for bold in Portal:Companies, which uses {{Transclude random excerpt}}, I edited Sony, changing

{{Nihongo foot|'''Sony Group Corporation'''|ソニーグループ株式会社|Sonī Gurūpu Kabushiki gaisha|{{IPAc-en|ˈ|s|oʊ|n|i}}|group=lower-alpha|extra2={{respell|SOH|nee}}|lead=yes}} (formerly {{Nihongo foot|'''Tokyo Tsushin Kogyo [[Kabushiki gaisha|K.K.]]'''|東京通信工業株式会社|4=Tokyo Telecommunications Engineering Corporation|lead=yes|group=lower-alpha|Tōkyō Tsūshin Kōgyō Kabushiki gaisha}} and {{Nihongo foot|'''Sony Corporation'''|ソニー株式会社|lead=yes|group=lower-alpha|Sonī Kabushiki gaisha}})

to

{{Nihongo foot|'''Sony Group Corporation'''|ソニーグループ株式会社|Sonī Gurūpu Kabushiki gaisha|{{IPAc-en|ˈ|s|oʊ|n|i}}|group=lower-alpha|extra2={{respell|SOH|nee}}|lead=yes}} (formerly {{Nihongo foot|'''Tokyo Tsushin Kogyo''' <!-- for now, don't bold outside the wikilink, because that causes missing end tag for bold when this page is transcluded with {{Transclude random excerpt}}. -->[[Kabushiki gaisha|'''K.K.''']]|東京通信工業株式会社|4=Tokyo Telecommunications Engineering Corporation|lead=yes|group=lower-alpha|Tōkyō Tsūshin Kōgyō Kabushiki gaisha}} and {{Nihongo foot|'''Sony Corporation'''|ソニー株式会社|lead=yes|group=lower-alpha|Sonī Kabushiki gaisha}})

It did not work to change the problematic snip to {{Nihongo foot|'''Tokyo Tsushin Kogyo''' '''[[Kabushiki gaisha|K.K.]]'''...}}; it excerpted the bold from just before the wikilink but not the bold from just after the wikilink. It would be good to figure out why the original markup caused a problem and fix it. —Anomalocaris (talk) 00:39, 31 December 2024 (UTC)Reply

The issue was to do with there being an unexpected pipe wikilink in {{Nihongo foot}}, which would cause the cleanup during stripTemplates to accidentally leave an unclosed wikilink and template, which would later get trimmed down and cause everything after it to vanish, leading to the above linter error as well as all the text dissapearing. I've fixed this in Special:Diff/1266381727. Aidan9382 (talk) 09:31, 31 December 2024 (UTC)Reply
Aidan9382: Looks good. Thank you for fixing Module:Excerpt/portals, and for reverting my 3 edits of Sony. —Anomalocaris (talk) 18:57, 31 December 2024 (UTC)Reply