marklet icon indicating copy to clipboard operation
marklet copied to clipboard

Make LINK_EXTENSION and FILE_EXTENSION configurable

Open trieloff opened this issue 7 years ago • 6 comments

I think there are scenarios (like for Slate) where you'd want to have .html.md, but for GitHub pages, .md all the way is the right way.

I introduced this mess, and I will send a patch fixing it 😉

trieloff avatar Jan 15 '18 14:01 trieloff

We can introduce an command line parameter to set the target output link maybe ? With .md as default one

Faylixe avatar Jan 15 '18 14:01 Faylixe

Either a command line parameter or a Java system property. I need to look what feels more natural for Javadoc doclets. Agree on the default, we should go back to the 1.0.5 behavior.

trieloff avatar Jan 15 '18 15:01 trieloff

There is a specific command line processing API for doclet (see validOptions() and optionsLength() on Marklet.java) which can be used more easily than system properties I think. That way we can set a Singleton configuration with runtime parameters such as File / link extension.

Faylixe avatar Jan 15 '18 16:01 Faylixe

Just checked out the code and turns out you already have implements options for file extension (-e) and link extension (-l) with .md as default value for both :)

Faylixe avatar Jan 15 '18 16:01 Faylixe

@trieloff I fixed MarkletOptions#optionLength(String) method which didn't take in account new introduced option. Will published new version tomorrow. I plan to introduce unit testing / integration testing in order to ensure doclet is valid through CI before to publish into central.

Faylixe avatar Jan 16 '18 15:01 Faylixe

Nice! Thank you.

trieloff avatar Jan 16 '18 15:01 trieloff