Lines with a // hide-source comment are not rendered in the code snippet (#37).
What we need now is a way to display "nice" code as replacement for ugly hacks, which would otherwise make the demo hard to understand.
This feature will be helpful in cases where we use reflection in order to circumvent binary compatibility issues.
For instance, if the demo source is
Method m = Foo.class.getMethod("bar");
m.invoke(foo);
I want to be able to write it as
// show-source foo.bar();
Method m = Foo.class.getMethod("bar"); // hide-source
m.invoke(foo); // hide-source
So that it will be displayed as:
Lines with a
// hide-sourcecomment are not rendered in the code snippet (#37).What we need now is a way to display "nice" code as replacement for ugly hacks, which would otherwise make the demo hard to understand.
This feature will be helpful in cases where we use reflection in order to circumvent binary compatibility issues.
For instance, if the demo source is
I want to be able to write it as
So that it will be displayed as: