Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??

Since considering your OP ("... replace [...] with &#91;...&#93; ...") I've seen your "Edit:" (just 10 minutes ago). It's a pity that whoever sent you "direct comments", didn't actually post those comments here: the issue could have been discussed. As I said in my reply, "Using <pre> ... and <tt> ... is absolutely fine for non-ASCII text." — this has been standard practice for many years.

Thanks for making the effort to provide a fix. Unfortunately, the autogenerated links still exist in the original, and the new additions are pretty much unreadable due to the plethora of &#nnnn; entities.

I took the two blocks of "c-tags" text, and ran them through a quick-and-dirty script that I threw together to convert them to what the two, original <pre> blocks should have looked like.

#!/usr/bin/env perl use strict; use warnings; my $c1 = <<'C1'; Pronunciation /&#712;b&#603;t&#601;ld&#658;u&#720;z, &#712;bi&#720 +;t&#601;l-, -d&#658;u&#720;s/[1][2] Right ascension 05h 55m 10.30536s[3] Declination +07° 24&#8242; 25.4304&#8243;[3] Apparent magnitude (V) +0.50[4] (0.0–1.6[5]) Characteristics Evolutionary stage Red supergiant Spectral type M1–M2 Ia–ab[6] Apparent magnitude (J) &#8722;3.00[7] Apparent magnitude (K) &#8722;4.05[7] U&#8722;B color index +2.06[4] B&#8722;V color index +1.85[4] Variable type SRc[8] Absolute magnitude (MV) &#8722;5.85[12] C1 my $c2 = <<'C2'; fritz@laptop:~/Documents$ trans :ru betelgeuse -p betelgeuse &#1073;&#1077;&#1090;&#1077;&#1083;&#1100;&#1075;&#1077;&#1081;&#1079; +&#1077; (betel'geyze) Translations of betelgeuse [ English -> &#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081; ] betelgeuse &#1073;&#1077;&#1090;&#1077;&#1083;&#1100;&#1075;&#1077;&#1081;&#1 +079;&#1077;, &#1041;&#1077;&#1090;&#1077;&#1083;&# 1100;&#1075;&#1077;&#1081;&#1079;&#1077; fritz@laptop:~/Documents$ C2 my %c2pre = ('[' => '&#91;', ']' => '&#93;'); for my $c ($c1, $c2) { $c =~ s/([\[\]])/$c2pre{$1}/eg; print "<pre>\n$c</pre>\n"; print '-' x 60, "\n"; }

Here's the output:

<pre> Pronunciation /&#712;b&#603;t&#601;ld&#658;u&#720;z, &#712;bi&#720 +;t&#601;l-, -d&#658;u&#720;s/&#91;1&#93;&#91;2&#93; Right ascension 05h 55m 10.30536s&#91;3&#93; Declination +07° 24&#8242; 25.4304&#8243;&#91;3&#93; Apparent magnitude (V) +0.50&#91;4&#93; (0.0–1.6&#91;5&#93;) Characteristics Evolutionary stage Red supergiant Spectral type M1–M2 Ia–ab&#91;6&#93; Apparent magnitude (J) &#8722;3.00&#91;7&#93; Apparent magnitude (K) &#8722;4.05&#91;7&#93; U&#8722;B color index +2.06&#91;4&#93; B&#8722;V color index +1.85&#91;4&#93; Variable type SRc&#91;8&#93; Absolute magnitude (MV) &#8722;5.85&#91;12&#93; </pre> ------------------------------------------------------------ <pre> fritz@laptop:~/Documents$ trans :ru betelgeuse -p betelgeuse &#1073;&#1077;&#1090;&#1077;&#1083;&#1100;&#1075;&#1077;&#1081;&#1079; +&#1077; (betel'geyze) Translations of betelgeuse &#91; English -> &#1056;&#1091;&#1089;&#1089;&#1082;&#1080;&#1081; &#9 +3; betelgeuse &#1073;&#1077;&#1090;&#1077;&#1083;&#1100;&#1075;&#1077;&#1081;&#1 +079;&#1077;, &#1041;&#1077;&#1090;&#1077;&#1083;&#1100;&#1075;&#1077; +&#1081;&#1079;&#1077; fritz@laptop:~/Documents$ </pre> ------------------------------------------------------------

Before wrapping that output in <code>...</code>, I ran a "Preview": both <pre> blocks look fine, with the autogenerated links no longer there, and the Russian translation appearing in Cyrillic.

Please replace your two, original <pre> blocks with those above, and remove the two "Same data with c-tags: ..." sections. That should fix up everything and we can get rid of the consideration. Thankyou.

— Ken


In reply to Re: perl in the stars [pre- vs. c-tags] by kcott
in thread perl in the stars by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2023-12-07 06:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (32 votes). Check out past polls.

    Notices?