You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

110 lines
5.3KB

  1. <!DOCTYPE html>
  2. <html>
  3. <meta charset="utf-8">
  4. <head>
  5. <link rel="stylesheet" href="../../style.css">
  6. </head>
  7. <body>
  8. <script data-goatcounter="https://services.opengamestudio.org:443/count" async src="//services.opengamestudio.org:443/count.js"></script>
  9. <div id="header">
  10. <div class="header2">
  11. <div class="menu">
  12. <a href="../../en/news/index.html">News</a>
  13. <a href="../../en/game/index.html">Games</a>
  14. <a href="../../en/tool/index.html">Tools</a>
  15. <a href="../../en/page/about.html">About</a>
  16. </div>
  17. <div id="lang">
  18. <a href="../../en/news/psk-jvm-item.html">EN</a>
  19. <a href="../../ru/news/psk-jvm-item.html">RU</a>
  20. </div>
  21. <div class="clear"></div>
  22. </div>
  23. </div>
  24. <h3 class="left_item_title">In the news...</h3>
  25. <center>
  26. <div class="news_item">
  27. <h2 class="news_item_title">
  28. <a href="psk-jvm-item.html">PSKOV 2 for JVM</a>
  29. </h2>
  30. <p class="news_item_date">
  31. 2025-02-11 00:00
  32. </p>
  33. <div class="news_item_contents">
  34. <p><img src="../../images/2025_psk-jvm-item.png" alt="splash" /></p>
  35. <h1 id="seperatepagesgeneration">Seperate pages' generation</h1>
  36. <p>In January I implemented half of the functionality of original
  37. PSKOV: generation of separate HTML pages from Markdown.</p>
  38. <p>Both PSKOV 1 and PSKOV 2 produce HTML files that look the same in web browsers.
  39. However, the contents of the generated HTML files differ because PSKOV 1 uses
  40. <a href="https://github.com/showdownjs/showdown">Showdown</a> to convert Markdown to HTML, whereas PSKOV 2 uses
  41. <a href="https://github.com/JetBrains/markdown">intellij-markdown</a>.</p>
  42. <p>Let's see how the generated HTML files compare. Suppose we have the following
  43. page in Markdown:</p>
  44. <pre><code>Simple page in **Markdown** to convert to **HTML**.
  45. | № | Parser | Language |
  46. |---|--- |--- |
  47. | 1 | [Showdown][showdown] | JavaScript |
  48. | 2 | [intellij-markdown][intellij-markdown] | Kotlin |
  49. [intellij-markdown]: https://github.com/JetBrains/markdown
  50. [showdown]: https://github.com/showdownjs/showdown
  51. </code></pre>
  52. <p>PSKOV 1 converts the aforementioned Markdown to the following HTML:</p>
  53. <pre><code>&lt;p&gt;Simple page in &lt;strong&gt;Markdown&lt;/strong&gt; to convert to &lt;strong&gt;HTML&lt;/strong&gt;.&lt;/p&gt;
  54. &lt;table&gt;
  55. &lt;thead&gt;
  56. &lt;tr&gt;
  57. &lt;th&gt;№&lt;/th&gt;
  58. &lt;th&gt;Parser&lt;/th&gt;
  59. &lt;th&gt;Language&lt;/th&gt;
  60. &lt;/tr&gt;
  61. &lt;/thead&gt;
  62. &lt;tbody&gt;
  63. &lt;tr&gt;
  64. &lt;td&gt;1&lt;/td&gt;
  65. &lt;td&gt;&lt;a href="https://github.com/showdownjs/showdown"&gt;Showdown&lt;/a&gt;&lt;/td&gt;
  66. &lt;td&gt;JavaScript&lt;/td&gt;
  67. &lt;/tr&gt;
  68. &lt;tr&gt;
  69. &lt;td&gt;2&lt;/td&gt;
  70. &lt;td&gt;&lt;a href="https://github.com/JetBrains/markdown"&gt;intellij-markdown&lt;/a&gt;&lt;/td&gt;
  71. &lt;td&gt;Kotlin&lt;/td&gt;
  72. &lt;/tr&gt;
  73. &lt;/tbody&gt;
  74. &lt;/table&gt;
  75. </code></pre>
  76. <p>PSKOV 2:</p>
  77. <pre><code>&lt;body&gt;&lt;p&gt;Simple page in &lt;strong&gt;Markdown&lt;/strong&gt; to convert to &lt;strong&gt;HTML&lt;/strong&gt;.&lt;/p&gt;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;№&lt;/th&gt;&lt;th&gt;Parser&lt;/th&gt;&lt;th&gt;Language&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;1&lt;/td&gt;&lt;td&gt;&lt;a href="https://github.com/showdownjs/showdown"&gt;Showdown&lt;/a&gt;&lt;/td&gt;&lt;td&gt;JavaScript&lt;/td&gt;&lt;/tr&gt;&lt;tr class="intellij-row-even"&gt;&lt;td&gt;2&lt;/td&gt;&lt;td&gt;&lt;a href="https://github.com/JetBrains/markdown"&gt;intellij-markdown&lt;/a&gt;&lt;/td&gt;&lt;td&gt;Kotlin&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;/body&gt;
  78. </code></pre>
  79. <p>Here's how both HTML files are rendered in web browsers:</p>
  80. <p><img src="../../images/2025_psk-jvm-item_result.png" alt="result" /></p>
  81. <p>Identical rendering of different files. My internal
  82. perfectionist is outraged by such a disrepancy. And my internal
  83. pragmatist thinks this hardly deserves such an attention.</p>
  84. <h1 id="february">February</h1>
  85. <p>In February I'm going to update the cross-language dialect's translator to produce Context.</p>
  86. </div>
  87. </div>
  88. <div id="disqus_thread"></div>
  89. <script>
  90. var disqus_config = function () {
  91. this.page.url = "https://opengamestudio.org/en/news/psk-jvm-item.html";
  92. this.page.identifier = "psk-jvm-item.html";
  93. };
  94. (function() { // DON'T EDIT BELOW THIS LINE
  95. var d = document, s = d.createElement('script');
  96. s.src = 'https://opengamestudio.disqus.com/embed.js';
  97. s.setAttribute('data-timestamp', +new Date());
  98. (d.head || d.body).appendChild(s);
  99. })();
  100. </script>
  101. <noscript>Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
  102. <div id="footer">
  103. The site has been generated by <a href="http://opengamestudio.org/pskov">PSKOV</a>
  104. from <a href="http://github.com/ogstudio/site-opengamestudio">this source code</a>.
  105. </div>
  106. </center>
  107. </body>
  108. </html>