Markwon/assets/js/46.9a7f306b.js
Dimitry Ivanov b00d0efa9d deploy
2021-01-12 12:50:41 +03:00

1 line
7.0 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{244:function(t,s,a){"use strict";a.r(s);var n=a(0),e=Object(n.a)({},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"content"},[t._m(0),t._v(" "),a("LegacyWarning"),t._v(" "),t._m(1),t._v(" "),t._m(2),a("p",[t._v("As this artifact brings modified "),a("a",{attrs:{href:"https://github.com/jhy/jsoup",target:"_blank",rel:"noopener noreferrer"}},[t._v("jsoup"),a("OutboundLink")],1),t._v(" library\nit was moved to a standalone module in order to minimize dependencies and unused code\nin applications that does not require HTML render capabilities.")]),t._v(" "),a("p",[t._v("Before "),a("Badge",{attrs:{text:"2.0.0"}}),t._v(" "),a("code",[t._v("Markwon")]),t._v(" used android "),a("code",[t._v("Html")]),t._v(" class for parsing and\nrendering. Unfortunately, according to markdown specification, markdown can contain\nHTML in "),a("em",[t._v("unpredictable")]),t._v(" way if rendered "),a("em",[t._v("outside")]),t._v(" of browser. For example:")],1),t._v(" "),t._m(3),a("p",[t._v("This snippet could be represented as:")]),t._v(" "),t._m(4),t._v(" "),a("div",{staticClass:"tip custom-block"},[a("p",{staticClass:"custom-block-title"},[t._v("A bit of background")]),t._v(" "),a("br"),t._v(" "),a("GithubIssue",{attrs:{id:"52",displayName:"This issue"}}),t._v(" had brought attention to differences between HTML & commonmark implementations. "),a("br"),a("br")],1),t._v(" "),t._m(5),t._v(" "),t._m(6),t._v(" "),t._m(7),t._v(" "),t._m(8),t._v(" "),a("p",[t._v("To learn more about defining own TagHandlers, please refer to "),a("router-link",{attrs:{to:"/docs/v3/core/html-renderer.html"}},[t._v("html-renderer docs")])],1)],1)},[function(){var t=this.$createElement,s=this._self._c||t;return s("h1",{attrs:{id:"html"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#html","aria-hidden":"true"}},[this._v("#")]),this._v(" HTML")])},function(){var t=this.$createElement,s=this._self._c||t;return s("p",[this._v("This artifact encapsulates HTML parsing from the core artifact and provides\nfew predefined "),s("code",[this._v("TagHandlers")])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"language-java extra-class"},[a("pre",{pre:!0,attrs:{class:"language-java"}},[a("code",[a("span",{attrs:{class:"token keyword"}},[t._v("final")]),t._v(" Markwon markwon "),a("span",{attrs:{class:"token operator"}},[t._v("=")]),t._v(" Markwon"),a("span",{attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{attrs:{class:"token function"}},[t._v("builder")]),a("span",{attrs:{class:"token punctuation"}},[t._v("(")]),t._v("context"),a("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{attrs:{class:"token function"}},[t._v("usePlugin")]),a("span",{attrs:{class:"token punctuation"}},[t._v("(")]),t._v("HtmlPlugin"),a("span",{attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{attrs:{class:"token function"}},[t._v("create")]),a("span",{attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{attrs:{class:"token punctuation"}},[t._v(")")]),t._v("\n "),a("span",{attrs:{class:"token punctuation"}},[t._v(".")]),a("span",{attrs:{class:"token function"}},[t._v("build")]),a("span",{attrs:{class:"token punctuation"}},[t._v("(")]),a("span",{attrs:{class:"token punctuation"}},[t._v(")")]),a("span",{attrs:{class:"token punctuation"}},[t._v(";")]),t._v("\n")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("div",{staticClass:"language-markdown extra-class"},[a("div",{staticClass:"highlight-lines"},[a("br"),a("br"),a("br"),a("div",{staticClass:"highlighted"},[t._v(" ")]),a("br")]),a("pre",{pre:!0,attrs:{class:"language-markdown"}},[a("code",[a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("i")]),a("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\nHello from italics tag\n\n"),a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token punctuation"}},[t._v("</")]),t._v("i")]),a("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token punctuation"}},[t._v("<")]),t._v("b")]),a("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("bold>"),a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token tag"}},[a("span",{attrs:{class:"token punctuation"}},[t._v("</")]),t._v("b")]),a("span",{attrs:{class:"token punctuation"}},[t._v(">")])]),t._v("\n")])])])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[t._v("HtmlBlock ("),a("code",[t._v("<i>\\nHello from italics tag")]),t._v(")")]),t._v(" "),a("li",[t._v("HtmlInline ("),a("code",[t._v("<i>")]),t._v(")")]),t._v(" "),a("li",[t._v("HtmlInline ("),a("code",[t._v("<b>")]),t._v(")")]),t._v(" "),a("li",[t._v("Text ("),a("code",[t._v("bold")]),t._v(")")]),t._v(" "),a("li",[t._v("HtmlInline ("),a("code",[t._v("</b>")]),t._v(")")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("p",[this._v("Unfortunately Android "),s("code",[this._v("HTML")]),this._v(" class cannot parse a "),s("em",[this._v("fragment")]),this._v(" of HTML to later\nbe included in a bigger set of content. This is why the decision was made to bring\nHTML parsing "),s("em",[this._v("in-markwon-house")])])},function(){var t=this.$createElement,s=this._self._c||t;return s("h2",{attrs:{id:"predefined-taghandlers"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#predefined-taghandlers","aria-hidden":"true"}},[this._v("#")]),this._v(" Predefined TagHandlers")])},function(){var t=this,s=t.$createElement,a=t._self._c||s;return a("ul",[a("li",[a("code",[t._v("<img>")])]),t._v(" "),a("li",[a("code",[t._v("<a>")])]),t._v(" "),a("li",[a("code",[t._v("<blockquote>")])]),t._v(" "),a("li",[a("code",[t._v("<sub>")])]),t._v(" "),a("li",[a("code",[t._v("<sup>")])]),t._v(" "),a("li",[a("code",[t._v("<b>, <strong>")])]),t._v(" "),a("li",[a("code",[t._v("<s>, <del>")])]),t._v(" "),a("li",[a("code",[t._v("<u>, <ins>")])]),t._v(" "),a("li",[a("code",[t._v("<ul>, <ol>")])]),t._v(" "),a("li",[a("code",[t._v("<i>, <cite>, <em>, <dfn>")])]),t._v(" "),a("li",[a("code",[t._v("<h1>, <h2>, <h3>, <h4>, <h5>, <h6>")])])])},function(){var t=this.$createElement,s=this._self._c||t;return s("div",{staticClass:"tip custom-block"},[s("p",{staticClass:"custom-block-title"},[this._v("TIP")]),this._v(" "),s("p",[this._v("All predefined tag handlers will use styling spans for native markdown content.\nSo, if your "),s("code",[this._v("Markwon")]),this._v(" instance was configured to, for example, render Emphasis\nnodes as a "),s("span",{staticStyle:{color:"#FF0000"}},[this._v("red text")]),this._v(" then HTML tag handler will\nuse the same span. This includes images, links, UrlResolver, LinkProcessor, etc")])])}],!1,null,null,null);e.options.__file="README.md";s.default=e.exports}}]);