Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,9 @@ private static boolean hasMultipleNewlines(String s) {
// Match "@param <T>" specially in case the <T> is a <P> or other HTML tag we treat specially.
private static final Pattern FOOTER_TAG_PATTERN = compile("^@(param\\s+<\\w+>|[a-z]\\w*)");
private static final Pattern MOE_BEGIN_STRIP_COMMENT_PATTERN =
compile("^<!--\\s*MOE:begin_intracomment_strip\\s*-->");
compile("^<!--\\s*M" + "OE:begin_intracomment_strip\\s*-->");
private static final Pattern MOE_END_STRIP_COMMENT_PATTERN =
compile("^<!--\\s*MOE:end_intracomment_strip\\s*-->");
compile("^<!--\\s*M" + "OE:end_intracomment_strip\\s*-->");
private static final Pattern HTML_COMMENT_PATTERN = fullCommentPattern();
private static final Pattern PRE_OPEN_PATTERN = openTagPattern("pre");
private static final Pattern PRE_CLOSE_PATTERN = closeTagPattern("pre");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,48 +115,48 @@ public void moeComments() {
String[] input = {
"/**",
" * Deatomizes the given user.",
" * <!-- MOE:begin_intracomment_strip -->",
" * See go/deatomizer-v5 for the design doc.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * See deatomizer-v5 for the design doc.",
" * <!-- M" + "OE:end_intracomment_strip -->",
" * To reatomize, call {@link reatomize}.",
" *",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * <p>This method is used in the Google teleporter.",
" *",
" * <p>Yes, we have a teleporter.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:end_intracomment_strip -->",
" *",
" * @param user the person to teleport.",
" * <!-- MOE:begin_intracomment_strip -->",
" * Users must sign go/deatomize-waiver ahead of time.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * Users must sign deatomize-waiver ahead of time.",
" * <!-- M" + "OE:end_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * @deprecated Sometimes turns the user into a goat.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:end_intracomment_strip -->",
" */",
"class Test {}",
};
String[] expected = {
"/**",
" * Deatomizes the given user.",
" * <!-- MOE:begin_intracomment_strip -->",
" * See go/deatomizer-v5 for the design doc.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * See deatomizer-v5 for the design doc.",
" * <!-- M" + "OE:end_intracomment_strip -->",
" * To reatomize, call {@link reatomize}.",
" *",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * <p>This method is used in the Google teleporter.",
" *",
" * <p>Yes, we have a teleporter.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:end_intracomment_strip -->",
" *",
" * @param user the person to teleport.",
" * <!-- MOE:begin_intracomment_strip -->",
" * Users must sign go/deatomize-waiver ahead of time.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * Users must sign deatomize-waiver ahead of time.",
" * <!-- M" + "OE:end_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * @deprecated Sometimes turns the user into a goat.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:end_intracomment_strip -->",
" */",
"class Test {}",
};
Expand All @@ -169,15 +169,15 @@ public void moeCommentBeginOnlyInMiddleOfDoc() {
String[] input = {
"/**", //
" * Foo.",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * Bar.",
" */",
"class Test {}",
};
String[] expected = {
"/**", //
" * Foo.",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" * Bar.",
" */",
"class Test {}",
Expand All @@ -192,7 +192,7 @@ public void moeCommentBeginOnlyAtEndOfDoc() {
String[] input = {
"/**", //
" * Foo.",
" * <!-- MOE:begin_intracomment_strip -->",
" * <!-- M" + "OE:begin_intracomment_strip -->",
" */",
"class Test {}",
};
Expand All @@ -209,14 +209,14 @@ public void moeCommentEndOnly() {
String[] input = {
"/**", //
" * Foo.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:end_intracomment_strip -->",
" */",
"class Test {}",
};
String[] expected = {
"/**", //
" * Foo.",
" * <!-- MOE:end_intracomment_strip -->",
" * <!-- M" + "OE:end_intracomment_strip -->",
" */",
"class Test {}",
};
Expand Down