<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>PhpStorm | Diego J. Muñoz. Software a medida. Freelance. Delphi.</title>
    <link>http://el-programador.com/tags/phpstorm/</link>
      <atom:link href="http://el-programador.com/tags/phpstorm/index.xml" rel="self" type="application/rss+xml" />
    <description>PhpStorm</description>
    <generator>Source Themes Academic (https://sourcethemes.com/academic/)</generator><language>es-es</language><lastBuildDate>Wed, 03 Mar 2021 00:00:00 +0000</lastBuildDate>
    <image>
      <url>http://el-programador.com/img/icon-192.png</url>
      <title>PhpStorm</title>
      <link>http://el-programador.com/tags/phpstorm/</link>
    </image>
    
    <item>
      <title>Links markdown a links html con PhpStorm. target blank</title>
      <link>http://el-programador.com/post/markdown-link-to-html-phpstorm/</link>
      <pubDate>Wed, 03 Mar 2021 00:00:00 +0000</pubDate>
      <guid>http://el-programador.com/post/markdown-link-to-html-phpstorm/</guid>
      <description>&lt;p&gt;Este blog &lt;a href=&#34;http://el-programador.com/post/hugo-markdown/&#34; target=&#34;_blank&#34;&gt;está hecho con Hugo&lt;/a&gt;. Me encontraba con el problema de que en Markdown no se puede poner un link con
target=&amp;rdquo;_blank&amp;rdquo; y por tanto no terminaba de convencerme el asunto de los links&amp;hellip;
En Markdown se puede poner código html directamente, pero yo ya tenía muchas entradas escritas con los links en formato
markdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;[descripcion del link](url del link)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Pero &lt;a href=&#34;https://www.jetbrains.com/es-es/phpstorm/&#34; target=&#34;_blank&#34;&gt;PhpStorm&lt;/a&gt; (el IDE que utilizo para hacer el blog, porque me lo conozco bien, por la integración con Git y porque
los IDEs de IntelliJ son buenísimos!) tiene la opción de reemplazar texto utilizando expresiones regulares, por tanto,
según se dice &lt;a href=&#34;https://dev.to/mattkenefick/regex-convert-markdown-links-to-html-anchors-f7j&#34; target=&#34;_blank&#34;&gt;aquí&lt;/a&gt;,
en PhpStorm hacemos, reemplazar (ctrl-r) e introducimos:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;regex.jpg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;y listo, los links en formato markdown quedan convertidos a links html&lt;/p&gt;
&lt;p&gt;la expresión regular utilizada es esta:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\[([^\]]+)\]\(([^\)]+)\)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;y la reemplazamos por:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&amp;quot;$2&amp;quot; target=&amp;quot;_blank&amp;quot;&amp;gt;$1&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Finalmente, en &lt;strong&gt;config.toml&lt;/strong&gt; (de Hugo), añadimos:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#DJM Habilitamos render de html directamente
[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true
&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    
  </channel>
</rss>
