{"id":85,"date":"2013-12-24T12:44:52","date_gmt":"2013-12-24T12:44:52","guid":{"rendered":"http:\/\/esferas.org\/msqlu\/2013\/12\/24\/resaltado-de-sintaxis-por-las-bravas\/"},"modified":"2013-12-24T12:44:52","modified_gmt":"2013-12-24T12:44:52","slug":"resaltado-de-sintaxis-por-las-bravas","status":"publish","type":"post","link":"https:\/\/esferas.org\/msqlu\/2013\/12\/24\/resaltado-de-sintaxis-por-las-bravas\/","title":{"rendered":"Resaltado de s\u00edntaxis por las bravas &#8230;"},"content":{"rendered":"<div class='__iawmlf-post-loop-links' style='display:none;' data-iawmlf-post-links='[{&quot;id&quot;:1276,&quot;href&quot;:&quot;http:\\\/\\\/tohtml.com&quot;,&quot;archived_href&quot;:&quot;https:\\\/\\\/web-wp.archive.org\\\/web\\\/20260415205515\\\/https:\\\/\\\/tohtml.com\\\/&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[],&quot;broken&quot;:false,&quot;last_checked&quot;:null,&quot;process&quot;:&quot;done&quot;}]'><\/div>\n<p>&#8230; dado que hacerlo con Movable Type a estas alturas no parece posible.<\/p>\n<\/p>\n<p><!--more--><\/p>\n<p>As\u00ed que he buscado una herramienta web y me he encontrado <a href=\"http:\/\/tohtml.com\">http:\/\/tohtml.com<\/a> que hace un trabajo fino y tiene la facilidad de uso de una tostadora.<\/p>\n<p>Como Movable Type me permite insertar fragmentos de HTML en bruto voy a probar aqu\u00ed con algunos\u00a0 de c\u00f3digo en Perl.<\/p>\n<h3>Fragmento original<\/h3>\n<p>Inclu\u00eddo en un bloque <em>pre<\/em> normal y corriente.<\/p>\n<pre>package TPC;<br \/>use Moose;<br \/>use Moose::Util::TypeConstraints;<br \/>use namespace::autoclean;<br \/>use utf8;<br \/><br \/># extensions and roles <br \/><br \/># external modules<br \/>use TPC::Termino;<br \/><br \/># attributes<br \/>has 'nombre'    =&gt;  (<br \/>    documentation   =&gt;  q(Nombre descriptivo),<br \/>    is              =&gt;  'ro',<br \/>    isa             =&gt;  'Str',<br \/>    lazy_build      =&gt;  1,<br \/>);<br \/>has 'resultado' =&gt;  (<br \/>    documentation   =&gt;  q(Resultado final de la lista de t\u00e9rminos),<br \/>    is              =&gt;  'ro',   <br \/>    isa             =&gt;  'Num',<br \/>    lazy_build      =&gt;  1,<br \/>);<br \/>has 'terminos'  =&gt;  (<br \/>    documentation   =&gt;  q(Lista de t\u00e9rminos para obtener el resultado),<br \/>    traits          =&gt;  [ 'Array' ],<br \/>    is              =&gt;  'ro',<br \/>    isa             =&gt;  'ArrayRef[TPC::Termino]',<br \/>    default     =&gt;  sub { []; },<br \/>);package TPC;<br \/>use Moose;<br \/>use Moose::Util::TypeConstraints;<br \/>use namespace::autoclean;<br \/>use utf8;<br \/><br \/># extensions and roles <br \/><br \/># external modules<br \/>use TPC::Termino;<br \/><br \/># attributes<br \/>has 'nombre'    =&gt;  (<br \/>    documentation   =&gt;  q(Nombre descriptivo),<br \/>    is              =&gt;  'ro',<br \/>    isa             =&gt;  'Str',<br \/>    lazy_build      =&gt;  1,<br \/>);<br \/>has 'resultado' =&gt;  (<br \/>    documentation   =&gt;  q(Resultado final de la lista de t\u00e9rminos),<br \/>    is              =&gt;  'ro',   <br \/>    isa             =&gt;  'Num',<br \/>    lazy_build      =&gt;  1,<br \/>);<br \/>has 'terminos'  =&gt;  (<br \/>    documentation   =&gt;  q(Lista de t\u00e9rminos para obtener el resultado),<br \/>    traits          =&gt;  [ 'Array' ],<br \/>    is              =&gt;  'ro',<br \/>    isa             =&gt;  'ArrayRef[TPC::Termino]',<br \/>    default     =&gt;  sub { []; },<br \/>);<br \/>    <br \/># variables<br \/>our $VERSION    =   '0.1';<br \/><br \/># public methods<br \/><br \/># private methods<br \/><br \/>no Moose;<br \/>__PACKAGE__-&gt;meta-&gt;make_immutable;<br \/><br \/>1;<br \/>    <br \/># variables<br \/>our $VERSION    =   '0.1';<br \/><br \/># public methods<br \/><br \/># private methods<br \/><br \/>no Moose;<br \/>__PACKAGE__-&gt;meta-&gt;make_immutable;<br \/><br \/>1;<\/pre>\n<h3>Fragmento resaltado<\/h3>\n<p>Utilizando el estilo <em>white<\/em> que deber\u00eda cambiar el fondo. Supongo que el tema que empleo con Movable Type est\u00e1 anulando los valores indicados en el siguiente bloque.<\/p>\n<pre><span style=\"color: #800000; font-weight: bold;\">package <\/span>TPC<span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">use<\/span> Moose<span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">use<\/span> <span style=\"color: #bb7977; font-weight: bold;\">Moose<\/span><span style=\"color: #808030;\">::<\/span><span style=\"color: #bb7977; font-weight: bold;\">Util<\/span><span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>TypeConstraints<span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">use<\/span> <span style=\"color: #bb7977; font-weight: bold;\">namespace<\/span><span style=\"color: #808030;\">:<\/span><span style=\"color: #808030;\">:<\/span>autoclean<span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #800000; font-weight: bold;\">use<\/span> utf8<span style=\"color: #800080;\">;<\/span>\n\n<span style=\"color: #696969;\"># extensions and roles <\/span>\n\n<span style=\"color: #696969;\"># external modules<\/span>\n<span style=\"color: #800000; font-weight: bold;\">use<\/span> <span style=\"color: #bb7977; font-weight: bold;\">TPC<\/span><span style=\"color: #808030;\">::<\/span><span style=\"color: #bb7977; font-weight: bold;\">Termino<\/span><span style=\"color: #800080;\">;<\/span>\n\n<span style=\"color: #696969;\"># attributes<\/span>\nhas <span style=\"color: #0000e6;\">'nombre'<\/span>    <span style=\"color: #808030;\">=<\/span><span style=\"color: #808030;\">&gt;<\/span>  <span style=\"color: #808030;\">(<\/span>\n    <span style=\"color: #797997;\">documentation   <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #800000; font-weight: bold;\">q<\/span><span style=\"color: #800000;\">(<\/span><span style=\"color: #0000e6;\">Nombre descriptivo<\/span><span style=\"color: #800000;\">)<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">is              <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #0000e6;\">'ro'<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">isa             <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #0000e6;\">'Str'<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">lazy_build      <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">,<\/span>\n<span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\nhas <span style=\"color: #0000e6;\">'resultado'<\/span> <span style=\"color: #808030;\">=<\/span><span style=\"color: #808030;\">&gt;<\/span>  <span style=\"color: #808030;\">(<\/span>\n    <span style=\"color: #797997;\">documentation   <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #800000; font-weight: bold;\">q<\/span><span style=\"color: #800000;\">(<\/span><span style=\"color: #0000e6;\">Resultado final de la lista de t\u00e9rminos<\/span><span style=\"color: #800000;\">)<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">is              <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #0000e6;\">'ro'<\/span><span style=\"color: #808030;\">,<\/span>   \n    <span style=\"color: #797997;\">isa             <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #0000e6;\">'Num'<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">lazy_build      <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #008c00;\">1<\/span><span style=\"color: #808030;\">,<\/span>\n<span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\nhas <span style=\"color: #0000e6;\">'terminos'<\/span>  <span style=\"color: #808030;\">=<\/span><span style=\"color: #808030;\">&gt;<\/span>  <span style=\"color: #808030;\">(<\/span>\n    <span style=\"color: #797997;\">documentation   <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #800000; font-weight: bold;\">q<\/span><span style=\"color: #800000;\">(<\/span><span style=\"color: #0000e6;\">Lista de t\u00e9rminos para obtener el resultado<\/span><span style=\"color: #800000;\">)<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">traits          <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #808030;\">[<\/span> <span style=\"color: #0000e6;\">'Array'<\/span> <span style=\"color: #808030;\">]<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">is              <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #0000e6;\">'ro'<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">isa             <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #0000e6;\">'ArrayRef[TPC::Termino]'<\/span><span style=\"color: #808030;\">,<\/span>\n    <span style=\"color: #797997;\">default     <\/span><span style=\"color: #808030;\">=&gt;<\/span>  <span style=\"color: #800000; font-weight: bold;\">sub<\/span> <span style=\"color: #800080;\">{<\/span> <span style=\"color: #808030;\">[<\/span><span style=\"color: #808030;\">]<\/span><span style=\"color: #800080;\">;<\/span> <span style=\"color: #800080;\">}<\/span><span style=\"color: #808030;\">,<\/span>\n<span style=\"color: #808030;\">)<\/span><span style=\"color: #800080;\">;<\/span>\n    \n<span style=\"color: #696969;\"># variables<\/span>\n<span style=\"color: #800000; font-weight: bold;\">our<\/span> $VERSION    <span style=\"color: #808030;\">=<\/span>   <span style=\"color: #0000e6;\">'0.1'<\/span><span style=\"color: #800080;\">;<\/span>\n\n<span style=\"color: #696969;\"># public methods<\/span>\n\n<span style=\"color: #696969;\"># private methods<\/span>\n\n<span style=\"color: #800000; font-weight: bold;\">no<\/span> Moose<span style=\"color: #800080;\">;<\/span>\n<span style=\"color: #797997;\">__PACKAGE__<\/span><span style=\"color: #808030;\">-&gt;<\/span>meta<span style=\"color: #808030;\">-&gt;<\/span>make_immutable<span style=\"color: #800080;\">;<\/span>\n\n<span style=\"color: #008c00;\">1<\/span><span style=\"color: #800080;\">;<\/span>\n<\/pre>\n<p>Aplicando ahora otro estilo como el negro, que es el m\u00e1s parecido al que empleo en el editor, aunque con los mismo resultados fallidos que el anterior.<\/p>\n<pre><span style=\"color: #e66170; font-weight: bold;\">package <\/span>TPC<span style=\"color: #b060b0;\">;<\/span>\n<span style=\"color: #e66170; font-weight: bold;\">use<\/span> Moose<span style=\"color: #b060b0;\">;<\/span>\n<span style=\"color: #e66170; font-weight: bold;\">use<\/span> <span style=\"color: #904050;\">Moose<\/span><span style=\"color: #d2cd86;\">::<\/span><span style=\"color: #904050;\">Util<\/span><span style=\"color: #d2cd86;\">:<\/span><span style=\"color: #d2cd86;\">:<\/span>TypeConstraints<span style=\"color: #b060b0;\">;<\/span>\n<span style=\"color: #e66170; font-weight: bold;\">use<\/span> <span style=\"color: #904050;\">namespace<\/span><span style=\"color: #d2cd86;\">:<\/span><span style=\"color: #d2cd86;\">:<\/span>autoclean<span style=\"color: #b060b0;\">;<\/span>\n<span style=\"color: #e66170; font-weight: bold;\">use<\/span> utf8<span style=\"color: #b060b0;\">;<\/span>\n\n<span style=\"color: #9999a9;\"># extensions and roles <\/span>\n\n<span style=\"color: #9999a9;\"># external modules<\/span>\n<span style=\"color: #e66170; font-weight: bold;\">use<\/span> <span style=\"color: #904050;\">TPC<\/span><span style=\"color: #d2cd86;\">::<\/span><span style=\"color: #904050;\">Termino<\/span><span style=\"color: #b060b0;\">;<\/span>\n\n<span style=\"color: #9999a9;\"># attributes<\/span>\nhas <span style=\"color: #00c4c4;\">'nombre'<\/span>    <span style=\"color: #d2cd86;\">=<\/span><span style=\"color: #d2cd86;\">&gt;<\/span>  <span style=\"color: #d2cd86;\">(<\/span>\n    documentation   <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #e66170; font-weight: bold;\">q<\/span><span style=\"color: #02d045;\">(<\/span><span style=\"color: #00c4c4;\">Nombre descriptivo<\/span><span style=\"color: #02d045;\">)<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    is              <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00c4c4;\">'ro'<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    isa             <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00c4c4;\">'Str'<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    lazy_build      <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00a800;\">1<\/span><span style=\"color: #d2cd86;\">,<\/span>\n<span style=\"color: #d2cd86;\">)<\/span><span style=\"color: #b060b0;\">;<\/span>\nhas <span style=\"color: #00c4c4;\">'resultado'<\/span> <span style=\"color: #d2cd86;\">=<\/span><span style=\"color: #d2cd86;\">&gt;<\/span>  <span style=\"color: #d2cd86;\">(<\/span>\n    documentation   <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #e66170; font-weight: bold;\">q<\/span><span style=\"color: #02d045;\">(<\/span><span style=\"color: #00c4c4;\">Resultado final de la lista de t\u00e9rminos<\/span><span style=\"color: #02d045;\">)<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    is              <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00c4c4;\">'ro'<\/span><span style=\"color: #d2cd86;\">,<\/span>   \n    isa             <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00c4c4;\">'Num'<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    lazy_build      <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00a800;\">1<\/span><span style=\"color: #d2cd86;\">,<\/span>\n<span style=\"color: #d2cd86;\">)<\/span><span style=\"color: #b060b0;\">;<\/span>\nhas <span style=\"color: #00c4c4;\">'terminos'<\/span>  <span style=\"color: #d2cd86;\">=<\/span><span style=\"color: #d2cd86;\">&gt;<\/span>  <span style=\"color: #d2cd86;\">(<\/span>\n    documentation   <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #e66170; font-weight: bold;\">q<\/span><span style=\"color: #02d045;\">(<\/span><span style=\"color: #00c4c4;\">Lista de t\u00e9rminos para obtener el resultado<\/span><span style=\"color: #02d045;\">)<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    traits          <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #d2cd86;\">[<\/span> <span style=\"color: #00c4c4;\">'Array'<\/span> <span style=\"color: #d2cd86;\">]<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    is              <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00c4c4;\">'ro'<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    isa             <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #00c4c4;\">'ArrayRef[TPC::Termino]'<\/span><span style=\"color: #d2cd86;\">,<\/span>\n    default     <span style=\"color: #d2cd86;\">=&gt;<\/span>  <span style=\"color: #e66170; font-weight: bold;\">sub<\/span> <span style=\"color: #b060b0;\">{<\/span> <span style=\"color: #d2cd86;\">[<\/span><span style=\"color: #d2cd86;\">]<\/span><span style=\"color: #b060b0;\">;<\/span> <span style=\"color: #b060b0;\">}<\/span><span style=\"color: #d2cd86;\">,<\/span>\n<span style=\"color: #d2cd86;\">)<\/span><span style=\"color: #b060b0;\">;<\/span>\n    \n<span style=\"color: #9999a9;\"># variables<\/span>\n<span style=\"color: #e66170; font-weight: bold;\">our<\/span> $VERSION    <span style=\"color: #d2cd86;\">=<\/span>   <span style=\"color: #00c4c4;\">'0.1'<\/span><span style=\"color: #b060b0;\">;<\/span>\n\n<span style=\"color: #9999a9;\"># public methods<\/span>\n\n<span style=\"color: #9999a9;\"># private methods<\/span>\n\n<span style=\"color: #e66170; font-weight: bold;\">no<\/span> Moose<span style=\"color: #b060b0;\">;<\/span>\n__PACKAGE__<span style=\"color: #d2cd86;\">-&gt;<\/span>meta<span style=\"color: #d2cd86;\">-&gt;<\/span>make_immutable<span style=\"color: #b060b0;\">;<\/span>\n\n<span style=\"color: #00a800;\">1<\/span><span style=\"color: #b060b0;\">;<\/span>\n<\/pre>\n<p>Menuda pereza ponerse ahora a retocar la hoja de estilo del blog &#8230; :-(<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8230; dado que hacerlo con Movable Type a estas alturas no parece posible.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"1","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","webmentions_disabled_pings":false,"webmentions_disabled":false,"footnotes":""},"categories":[7],"tags":[32,144],"class_list":["post-85","post","type-post","status-publish","format-standard","hentry","category-perl","tag-movable-type","tag-syntax-highlight"],"_links":{"self":[{"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/posts\/85","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/comments?post=85"}],"version-history":[{"count":0,"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/posts\/85\/revisions"}],"wp:attachment":[{"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/media?parent=85"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/categories?post=85"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/esferas.org\/msqlu\/wp-json\/wp\/v2\/tags?post=85"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}