Title: Add support for inline subparsers · Issue #263 · commonmark/commonmark-java · GitHub
Open Graph Title: Add support for inline subparsers · Issue #263 · commonmark/commonmark-java
X Title: Add support for inline subparsers · Issue #263 · commonmark/commonmark-java
Description: I was trying to implement an extension that turns references denoted by a prefix character (@,#, or ~) into a link, and missing the means to do it. A PostProcessor won't do it, because I want the prefix characters to be escapable by back...
Open Graph Description: I was trying to implement an extension that turns references denoted by a prefix character (@,#, or ~) into a link, and missing the means to do it. A PostProcessor won't do it, because I want the p...
X Description: I was trying to implement an extension that turns references denoted by a prefix character (@,#, or ~) into a link, and missing the means to do it. A PostProcessor won't do it, because I want t...
Opengraph URL: https://github.com/commonmark/commonmark-java/issues/263
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Add support for inline subparsers","articleBody":"I was trying to implement an extension that turns references denoted by a prefix character (@,#, or ~) into a link, and missing the means to do it. A PostProcessor won't do it, because I want the prefix characters to be escapable by backslash to take away their special meaning, and the info necessary for that doesn't survive into the AST. The Delimiter stuff isn't useful either, because we have no definite closing character.\r\n\r\nThe proper solution would be a sub-parser that is activated then the main parser sees the prefix character. This something that `InlineParserImpl` already does internally:\r\n\r\n```\r\n this.inlineParsers = new HashMap\u003c>();\r\n this.inlineParsers.put('\\\\', Collections.\u003cInlineContentParser>singletonList(new BackslashInlineParser()));\r\n this.inlineParsers.put('`', Collections.\u003cInlineContentParser>singletonList(new BackticksInlineParser()));\r\n this.inlineParsers.put('&', Collections.\u003cInlineContentParser>singletonList(new EntityInlineParser()));\r\n this.inlineParsers.put('\u003c', Arrays.asList(new AutolinkInlineParser(), new HtmlInlineParser()));\r\n ```\r\n\r\nbut not only is `InlineParserImpl` in an `internal` package, but all relevant methods and fields are private as well, so I have no chance to use it even if I didn't care about backward compatibility.\r\n\r\nI suggest opening up an official way of adding sub-parsers to the internal parser.","author":{"url":"https://github.com/avarga","@type":"Person","name":"avarga"},"datePublished":"2022-06-22T09:32:45Z","url":"https://github.com/commonmark/commonmark-java/issues/263"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3ac3cabc-cb78-9aec-c752-c2b7786fc526 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A640:3DE1D3:7AE02:AA8CA:6AFBC7A2 |
| html-safe-nonce | 441e142adfbcd156a46401733352222ffe85a7a51217a53104c38e02eee52427 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjQwOjNERTFEMzo3QUUwMjpBQThDQTo2QUZCQzdBMiIsInZpc2l0b3JfaWQiOiI5MTQ2NDc2NDEzMDYwODkyNTc4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c76d5d8460ee9f1405e8208ec4795ec8bc265e887a4d20054be30ba80352687d |
| hovercard-subject-tag | issue:1279852989 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/commonmark/commonmark-java/263/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e917b0dee268166ce7d94379e5354f80a21d9b821806ebab68358a81888bccd9/commonmark/commonmark-java/issues/263 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e917b0dee268166ce7d94379e5354f80a21d9b821806ebab68358a81888bccd9/commonmark/commonmark-java/issues/263 |
| og:image:alt | I was trying to implement an extension that turns references denoted by a prefix character (@,#, or ~) into a link, and missing the means to do it. A PostProcessor won't do it, because I want the p... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | avarga |
| hostname | github.com |
| expected-hostname | github.com |
| None | d440bda0d812801778b27bfe9f7c1ce9ff22420c73f6f95150c4fcbca311c50b |
| turbo-cache-control | no-preview |
| go-import | github.com/commonmark/commonmark-java git https://github.com/commonmark/commonmark-java.git |
| octolytics-dimension-user_id | 8661225 |
| octolytics-dimension-user_login | commonmark |
| octolytics-dimension-repository_id | 39477878 |
| octolytics-dimension-repository_nwo | commonmark/commonmark-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 39477878 |
| octolytics-dimension-repository_network_root_nwo | commonmark/commonmark-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2c43021aed8695990c86c0eaaedc600bfeffec36 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width