Giter Club home page Giter Club logo

Comments (6)

ocram avatar ocram commented on August 16, 2024

Thank you so much!

This should have been fixed in e1ea5a0 now :) Can you try, please?

from javadoc-to-markdown.

elifoster avatar elifoster commented on August 16, 2024

I just tested this, the result is:

Documentation

public void method1(int i)

  • Parameters: i — single line description

public void method2(int i)

  • Parameters: i — line1

    line2

I'm not certain that is exactly what should be expected. I believe it should result in:

Documentation

public void method1(int i)

  • Parameters: i — single line description

public void method2(int i)

  • Parameters: i — line1 line2

Or something similar.

from javadoc-to-markdown.

ocram avatar ocram commented on August 16, 2024

@elifoster Thanks, that looks good! I understand that you might prefer another way of formatting the output, but your test proved that our fix to @sfrenkiel's original problem works correctly.

Personally, I prefer

line1

line2

to

line1 line2

for multi-line descriptions where the first version preserves the formatting from the source. You seem to disagree here, however. Do you have some example where your formatting makes more sense? Thank you!

from javadoc-to-markdown.

elifoster avatar elifoster commented on August 16, 2024

If the description happens to span multiple lines due to length, that is how it would be formatted in te source. Likewise with method descriptions and class descriptions which j2md already handles this way. That line break should be added for <br>s and line gaps.

For example

/**
 * @param a This method parameter is slightly complicated, and
 *         as such it spans multiple lines.
 */

would be expected to be a single line in the resulting markdown.

from javadoc-to-markdown.

ocram avatar ocram commented on August 16, 2024

You're right, thanks!

What about the following way of formatting the output?

Becomes single-line description in Markdown:

/**
 * @param a This method parameter is slightly complicated, and
 *          as such it spans multiple lines.
 */

Becomes multi-line description in Markdown:

/**
 * @param a This method parameter is slightly complicated, and
 *
 *          as such it spans multiple lines.
 */
/**
 * @param a This method parameter is slightly complicated, and
 *          <br>
 *          as such it spans multiple lines.
 */
/**
 * @param a This method parameter is slightly complicated, and
 *          <p>
 *          as such it spans multiple lines.
 */

from javadoc-to-markdown.

elifoster avatar elifoster commented on August 16, 2024

Yes that would be more consistent.

from javadoc-to-markdown.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.