question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Format http code in markdown

See original GitHub issue

Sometimes we may have some http code in markdown, e.g. image link like:

<p align="center">
   <img src="xxxx" width="60%" />
 </p>

Currently, markdown.FlexmarkStep in spotless could not fix http code formatting in markdown. It would be pretty handy if spotless could support this feature in the future.

BTW, I’d like to help with it but currently I haven’t found a good way to implement this. Any help will be appreciated! Thx

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
nedtwiggcommented, Aug 11, 2022

There is not, but it might be possible. In the Gradle plugin, FormatExtension is the receiver for adding generic steps. It has this method for defining a block, and then defining the steps within that block.

https://github.com/diffplug/spotless/blob/ce98b688cb4724a95e0abb05f4bbaf398097c1b8/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java#L674-L682

In the Maven plugin, the equivalents would be AbstractSpotlessMojo and FormatterFactory, but I’m not sure how to do a nested DSL in the maven plugin (or if that’s even possible).

1reaction
nedtwiggcommented, Aug 17, 2022

Feel free to comment further if you need more help.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Basic Syntax - Markdown Guide
Formatting Links. To emphasize links, add asterisks before and after the brackets and parentheses. To denote links as code, add backticks in the...
Read more >
Markdown Syntax Documentation - Daring Fireball
To produce a code block in Markdown, simply indent every line of the block by at least 4 spaces or 1 tab. For...
Read more >
Markdown Syntax | Hub - JetBrains
To format a code block in Markdown, indent every line of the block by at least four spaces. An indented code block cannot...
Read more >
Creating and highlighting code blocks - GitHub Docs
Share samples of code with fenced code blocks and enabling syntax highlighting. ... ```ruby require 'redcarpet' markdown = Redcarpet.new("Hello World!
Read more >
How do I format my posts using Markdown or HTML?
Markdown and HTML are ignored within a code block: ... Syntax highlighting for code ... HTML <img src="http://example.com/img.jpg">; Markdown ![sample ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found