Skip to content

Add support for conditional code #43

Closed
@javier-godoy

Description

@javier-godoy

Lines with a // hide-source comment are not rendered in the code snippet (#37).
Lines with a // show-source comment are rendered in the code snippet (#42).

What we need now is a way to display "nice" code depending on the framework version.

For instance:

// #if vaadin ge 22
// show-source foo();
// #elif vaadin eq 23
// show-source bar();
// #else
// show-source baz();
// #endif

would be rendered as foo(); in Vaadin 14-22, bar in Vaadin 23 and baz() in Vaadin 24.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions