Title: GJF adds
tag prior to the
Open Graph Title: GJF adds
tag prior to the
X Title: GJF adds
tag prior to the
Description: Detected at: checkstyle/checkstyle#15865, User's got his answer at: checkstyle/checkstyle#15865 (comment) GJF adds
prior to
tag: https://google.g...
Open Graph Description: Detected at: checkstyle/checkstyle#15865, User's got his answer at: checkstyle/checkstyle#15865 (comment) GJF adds
prior to
X Description: Detected at: checkstyle/checkstyle#15865, User's got his answer at: checkstyle/checkstyle#15865 (comment) GJF adds <p> prior to <div> tag, but the style guide says that block-level ...
Opengraph URL: https://github.com/google/google-java-format/issues/1180
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"GJF adds \u003cp> tag prior to the \u003cdiv> tag","articleBody":"Detected at: https://github.com/checkstyle/checkstyle/issues/15865, User's got his answer at: https://github.com/checkstyle/checkstyle/issues/15865#issuecomment-2462352189\n\nGJF adds `\u003cp>` prior to `\u003cdiv>` tag, but the style guide says that block-level tags should not be preceded by `\u003cp>` tag:\n\nhttps://google.github.io/styleguide/javaguide.html#s7.1.2-javadoc-paragraphs\n\n```\nHTML tags for other block-level elements, such as \u003cul> or \u003ctable>, are not preceded with \u003cp>.\n```\n\nHere's an example of it:\n\n```\n01: /**\n02: * Plugin to standardize all directions to their appropriate abbreviation.\n03: *\n04: * \u003cdiv>Some javadoc here....\u003c/div>\n05: *\n06: * \u003cul>\n07: * \u003cli>Item - 1 \u003c/li>\n08: * \u003cli>Item - 2 \u003c/li>\n09: * \u003cli>Item - 3 \u003c/li>\n10: * \u003c/ul>\n11: *\n12: * \u003cp>This plugin assumes numbered streets have the correct suffix, when applicable.\n13: */\n14: public class Test {\n15: /** Some javadoc. */\n16: public static void main(String[] args) {\n17: \n18: }\n19: }\n20: \n```\n\n```\n$ java -jar .\\checkstyle-10.20.1-all.jar -c .\\google_checks.xml .\\Test.java\nStarting audit...\nAudit done.\n```\n\n```\n$ java -jar .\\google-java-format-1.24.0-all-deps.jar .\\Test.java > TestUpdated.java\n```\n\n```\n01: /**\n02: * Plugin to standardize all directions to their appropriate abbreviation.\n03: *\n04: * \u003cp>\u003cdiv>Some javadoc here....\u003c/div>\n05: *\n06: * \u003cul>\n07: * \u003cli>Item - 1\n08: * \u003cli>Item - 2\n09: * \u003cli>Item - 3\n10: * \u003c/ul>\n11: *\n12: * \u003cp>This plugin assumes numbered streets have the correct suffix, when applicable.\n13: */\n14: public class Test {\n15: /** Some javadoc. */\n16: public static void main(String[] args) {}\n17: }\n18: \n```\n\n```\njava -jar .\\checkstyle-10.20.1-all.jar -c .\\google_checks.xml .\\TestUpdated.java\nStarting audit...\n[WARN] C:\\checkstyle testing\\.\\TestUpdated.java:4:4: \u003cp> tag should not precede HTML block-tag '\u003cdiv>', \u003cp> tag should be removed. [JavadocParagraph]\n[WARN] C:\\checkstyle testing\\.\\TestUpdated.java:14:1: The name of the outer type and the file do not match. [OuterTypeFilename]\nAudit done.\n```\n\nIgnore the `OuterTypeFilename` violation.\n\nThe formatter added `\u003cp>` tag preceding to `\u003cdiv>` tag, Checkstyle was complaining about it. But this did not happened in case of `\u003cul>` tag, formatter didn't added preceding `\u003cp>` tag to it.\n\nEdit: After formatting, GJF also removes closing li tags ( `\u003c/li>` )","author":{"url":"https://github.com/Zopsss","@type":"Person","name":"Zopsss"},"datePublished":"2024-11-09T04:27:07Z","url":"https://github.com/google/google-java-format/issues/1180"}
| 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:c9b4115e-ab44-57a1-688a-e104fda51108 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 842A:19EF86:1C2ADB:266081:6AFBAD60 |
| html-safe-nonce | 18e05b433dba9e948e0d25cf940c955531b40c7617fa32c4b7a9aa28c98ce8ca |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDJBOjE5RUY4NjoxQzJBREI6MjY2MDgxOjZBRkJBRDYwIiwidmlzaXRvcl9pZCI6IjkyMTUwMDIyMTI1NDE2NDAwMzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 71c03d46ea5b1556e069fdcd77d139af7b248af281c3b0d053048d1bfe2b332e |
| hovercard-subject-tag | issue:2645595402 |
| 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/google/google-java-format/1180/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e1f38e8c85ffc5b438b4b06778385afc229a1b8fbde2c50fb0548a26cba614b0/google/google-java-format/issues/1180 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e1f38e8c85ffc5b438b4b06778385afc229a1b8fbde2c50fb0548a26cba614b0/google/google-java-format/issues/1180 |
| og:image:alt | Detected at: checkstyle/checkstyle#15865, User's got his answer at: checkstyle/checkstyle#15865 (comment) GJF adds prior to tag, but the style guide says that block-level tags should not ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Zopsss |
| hostname | github.com |
| expected-hostname | github.com |
| None | e25fbd830d3e6ad0e8935c105cf4fdc70c593dffcd27bb45b790ae4fece5ea55 |
| turbo-cache-control | no-preview |
| go-import | github.com/google/google-java-format git https://github.com/google/google-java-format.git |
| octolytics-dimension-user_id | 1342004 |
| octolytics-dimension-user_login | |
| octolytics-dimension-repository_id | 35448780 |
| octolytics-dimension-repository_nwo | google/google-java-format |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 35448780 |
| octolytics-dimension-repository_network_root_nwo | google/google-java-format |
| 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 | 08c8f17f9d27054a108b8b6254e405de0151f660 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width