markdown-doclet icon indicating copy to clipboard operation
markdown-doclet copied to clipboard

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

Open nenick opened this issue 9 years ago • 2 comments

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.

nenick avatar Jun 07 '16 09:06 nenick

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

You can close this issue.

loddar avatar Jun 22 '16 09:06 loddar

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

loddar avatar Jul 04 '16 07:07 loddar