Abnaxos / markdown-doclet

A Doclet that allows the use of Markdown in JavaDoc comments.
GNU General Public License v3.0
319 stars 40 forks source link

Unexpected spacing in code block when using {@literal @} #61

Open nenick opened 8 years ago

nenick commented 8 years ago

When I use {@literal @} to including @ symbols in code blocks then the line starts with one space to much.

Sample snippet in package-info.java:

/**
 * ```java
 * {@literal @}RunWith(AndroidJUnit4.class)
 * public class MyTest {
 *
 *   {@literal @}Rule
 *   public IntentsTestRule<MyActivity> activityTestRule = new IntentsTestRule<>(MyActivity.class);
 *
 * }
 * ```
 */

Expected result:

@RunWith(AndroidJUnit4.class)
public class MyTest {

  @Rule
  public IntentsTestRule<MyActivity> activityTestRule = new IntentsTestRule<>(MyActivity.class);

}

But result has one space to much at each @ symbol.

 @RunWith(AndroidJUnit4.class)
public class MyTest {

   @Rule
  public IntentsTestRule<MyActivity> activityTestRule = new IntentsTestRule<>(MyActivity.class);

}

For @Rule I can remove one space and then it looks correct but at @RunWith this workaround does not work.

loddar commented 8 years ago

This not specific to Pegdown-Doclet. You will got the same, if you use the standard doclet.

You can close this issue.

loddar commented 8 years ago

By the way: My pull request (see #64) will solve this issue.