当我使用(doxia-module-markdown)[http://maven.apache.org/doxia/doxia/doxia-modules/doxia-module-markdown]创建maven站点时,.md文件包含链接&符号会导致错误消息。 example.md:
# Getting Started
## Now
1. goto [google] (https://www.google.com/?gws_rd=cr&q=test+site:com)
2. or goto <https://www.google.com/?gws_rd=cr&q=test+site:com>
ERRORMESSAGE:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.3:site (default-site) on project test: Error during page generation: Error parsing 'xxx\projects\test\src\site\markdown\not_working.md': line [3] Error parsing the model: entity reference name can not contain character =' (position: TEXT seen ...<a href="https://www.google.com/?gws_rd=cr&q=... @3:57) -> [Help 1]
一旦我取下&符号,错误就会消失。
答案 0 :(得分:3)
尝试用&
看起来字符串被解析为maven XML的一部分,为此你需要转义&amp;,&lt;,&gt;等等。