summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGilles Dubochet <gilles.dubochet@epfl.ch>2010-06-15 16:08:57 +0000
committerGilles Dubochet <gilles.dubochet@epfl.ch>2010-06-15 16:08:57 +0000
commit1e0846707622d0301b821cec67d3d0aac6361273 (patch)
tree1f2f0af83eb29c078806ecfa8ffd3ee70fab9ca5 /src
parentee23aefccc80eea9df30df44e1d13db1a3c0b313 (diff)
downloadscala-1e0846707622d0301b821cec67d3d0aac6361273.tar.gz
scala-1e0846707622d0301b821cec67d3d0aac6361273.tar.bz2
scala-1e0846707622d0301b821cec67d3d0aac6361273.zip
[scaladoc] Slightly more robust treatment of "c...
[scaladoc] Slightly more robust treatment of "code" HTML elements in Scaladoc comments. No review.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
index 475fbf584e..c7cf146894 100644
--- a/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
+++ b/src/compiler/scala/tools/nsc/doc/model/comment/CommentFactory.scala
@@ -71,14 +71,13 @@ trait CommentFactory { thisFactory: ModelFactory with CommentFactory =>
case "/h3" => " ===\n"
case "h4" | "h5" | "h6" => "\n==== "
case "/h4" | "/h5" | "/h6" => " ====\n"
- case "code" | "/code" => "`"
case "li" => "\n * - "
case _ => ""
}
/** Safe HTML tags that can be kept. */
protected val SafeTags =
- new Regex("""(</?(abbr|acronym|address|area|a|bdo|big|blockquote|br|button|b|caption|code|cite|col|colgroup|dd|del|dfn|em|fieldset|form|hr|img|input|ins|i|kbd|label|legend|link|map|object|optgroup|option|param|pre|q|samp|select|small|span|strong|sub|sup|table|tbody|td|textarea|tfoot|th|thead|tr|tt|var)( [^>]*)?/?>)""")
+ new Regex("""((<code( [^>]*)?>.*</code>)|(</?(abbr|acronym|address|area|a|bdo|big|blockquote|br|button|b|caption|cite|col|colgroup|dd|del|dfn|em|fieldset|form|hr|img|input|ins|i|kbd|label|legend|link|map|object|optgroup|option|param|pre|q|samp|select|small|span|strong|sub|sup|table|tbody|td|textarea|tfoot|th|thead|tr|tt|var)( [^>]*)?/?>))""")
protected val safeTagMarker = '\u000E'