artifacthealth / typedoc-plantuml

Plugin for TypeDoc that generates images for PlantUML diagrams embedded in comments.
Apache License 2.0
15 stars 6 forks source link

reflexion.comments.shortText/text #2

Closed Chklang closed 8 years ago

Chklang commented 8 years ago

Hi

I've found a bug(?) in the plugin. In the follow comment :

    /**
     * Utilities
     * 
     * Long description for utilities
     * 
     * <uml>
     *     Bob->Alice : hello
     * </uml>
     */

The line "Utilities" will be in the "shortText" attribut of "comment" object, and "Long description [...] </uml>" will be in the "text" attribut.

But to test your plugin i've tried

    /**
     * Utilities
     * <uml>
     *     Bob->Alice : hello
     * </uml>
     */

And here UML tags are into "shortText", not into "text", so your regexp not detect it. Maybe it's normal, but if it's the case, i think that we can send a warning to developper to say "Warn, UML tags are only replaced into text, not into shorttext. Please insert a breakline after the first comment line" (and an option to disable it :) ).

I hope to have helped many people :)

meirgottlieb commented 8 years ago

This is actually by design. There is a note about it in the README: "Also note that the first paragraph in the comment text will not be processed for UML diagrams." But I understand how this is confusing. I'll look into processing the shortText property as well.

Meir

meirgottlieb commented 8 years ago

It wasn't a problem to process shortText as well so I updated the plugin to do this and updated the README accordingly.