Giter Club home page Giter Club logo

Comments (9)

tj avatar tj commented on July 28, 2024

I have a lot that look like "Examples: " etc, that if for nothing other than backwards compat I would like to retain that functionality, but other than that I agree. I think we should only transform it to an h2 when it's short though

from dox.

cbou avatar cbou commented on July 28, 2024

It's a bit obscur, if it's short h2, if not p ...

from dox.

tj avatar tj commented on July 28, 2024

yup it is but I don't want to go redo docs for hundreds of projects :p

from dox.

cbou avatar cbou commented on July 28, 2024

I can understand. How to you produce your doc, because dox output is in json. Maybe this feature, "small words with colons becomes h2" could be a feature of the documentation generator and not of javadoc parser (dox) ?

from dox.

ForbesLindesay avatar ForbesLindesay commented on July 28, 2024

It's an interesting point, you can ask for dox to give you the markdown directly, and then parse it yourself. I do this myself in my own docs generating library (very much at an alpha stage at the moment) so I can parse the markdown myself and add syntax highlighting at the same time

This method lets you get complete control over the parsing.

from dox.

cbou avatar cbou commented on July 28, 2024

Thanks ForbesLindesay, I think you mean the raw option ?

I already notice this option. But when I parse Example: and ## Example: there is no diffrence in the output even if with the raw option. Both outputs are:

"description": {
      "full": "Parse the given `str`.\n\n## Examples:\n\n    parse(str)\n    // => \"wahoo\"\n",
      "summary": "Parse the given `str`.",
      "body": "## Examples:\n\n    parse(str)\n    // => \"wahoo\"\n"
    }

Because of this line: .replace(/^([A-Z][\w ]+):$/gm, '## $1')

from dox.

cbou avatar cbou commented on July 28, 2024

Sorry miss click on Close & comment

from dox.

ForbesLindesay avatar ForbesLindesay commented on July 28, 2024

ouch, that does seem like a bug to me, I don't think we should do the conversion in raw mode. @visionmedia what are your thoughts?

from dox.

tj avatar tj commented on July 28, 2024

I dont remember what I did ATM but yeah if it's in .raw that's no good

from dox.

Related Issues (20)

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.