我有下面的Javadoc,它有多行代码:
* <p>Usage example:
* <code>
* ConfigurationProperty property = ConfigurationProperty.Builder
* .create()
* .withHotKey("testKey")
* .withRunnableContext("testContext")
* .withRunnableContextType("APPLICATION")
* .build();
* </code>
*
* The {@link ConfigurationProperty.Builder#withRunnableContextType(String type) method
* throws an {@link IllegalArgumentException} if the provided type is not supported in
* {@link ConfigurationProperty#RUNNABLE_CONTEXT_TYPE}我的问题是代码不能在生成的Javadoc中以正确的缩进显示。下面是我在生成的Javadoc中看到的,没有任何缩进:
Immutable implementation of a ConfigurationProperty. This class is
immutable, and so is thread safe. An instance of the ConfigurationProperty
can be obtained by using the ConfigurationProperty.Builder
Usage example: ConfigurationProperty property =
ConfigurationProperty.Builder .create() .withHotKey("testKey")
.withRunnableContext("testContext") .withRunnableContextType("APPLICATION")
.build(); } The method throws an IllegalArgumentException if the provided
type is not supported in ConfigurationProperty.RUNNABLE_CONTEXT_TYPE如果我用pre标记替换代码,那么只显示第一行代码。

为什么会这样呢?我该如何解决这个问题?对如何纠正这个问题有什么想法吗?
请指教,
谢谢!
发布于 2015-06-21 04:44:01
使用<pre>而不是<code>。

https://stackoverflow.com/questions/30958681
复制相似问题