Merge branch 'stable-3.1' into stable-3.2
* stable-3.1: Update git submodules AccountResolver: limit number of ambiguous accounts in error message Update highlightjs to 10.5.0 Change-Id: Ib49b3bb95a606db0d0418d9d2e467aadba330768
This commit is contained in:
		@@ -109,7 +109,10 @@ public class AccountResolver {
 | 
			
		||||
 | 
			
		||||
    return result.asList().stream()
 | 
			
		||||
        .map(a -> formatForException(result, a))
 | 
			
		||||
        .collect(joining("\n", "Account '" + result.input() + "' is ambiguous:\n", ""));
 | 
			
		||||
        .limit(3)
 | 
			
		||||
        .collect(
 | 
			
		||||
            joining(
 | 
			
		||||
                "\n", "Account '" + result.input() + "' is ambiguous (at most 3 shown):\n", ""));
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  private static String formatForException(Result result, AccountState state) {
 | 
			
		||||
 
 | 
			
		||||
@@ -269,7 +269,8 @@ public class AccountResolverTest {
 | 
			
		||||
            () -> search("foo", searchers, allVisible()).asUnique());
 | 
			
		||||
    assertThat(thrown)
 | 
			
		||||
        .hasMessageThat()
 | 
			
		||||
        .isEqualTo("Account 'foo' is ambiguous:\n1: Anonymous Name (1)\n2: Anonymous Name (2)");
 | 
			
		||||
        .isEqualTo(
 | 
			
		||||
            "Account 'foo' is ambiguous (at most 3 shown):\n1: Anonymous Name (1)\n2: Anonymous Name (2)");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Test
 | 
			
		||||
@@ -311,7 +312,8 @@ public class AccountResolverTest {
 | 
			
		||||
                .new Result(
 | 
			
		||||
                    "foo", ImmutableList.of(newAccount(3), newAccount(1)), ImmutableList.of())))
 | 
			
		||||
        .hasMessageThat()
 | 
			
		||||
        .isEqualTo("Account 'foo' is ambiguous:\n1: Anonymous Name (1)\n3: Anonymous Name (3)");
 | 
			
		||||
        .isEqualTo(
 | 
			
		||||
            "Account 'foo' is ambiguous (at most 3 shown):\n1: Anonymous Name (1)\n3: Anonymous Name (3)");
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  @Test
 | 
			
		||||
 
 | 
			
		||||
@@ -26,27 +26,10 @@ languages included. Build it with the following:
 | 
			
		||||
    $>  ln -s ../../highlightjs-closure-templates/soy.js src/languages/soy.js
 | 
			
		||||
    $>  mkdir test/detect/soy && ln -s ../../../highlightjs-closure-templates/test/detect/soy/default.txt test/detect/soy/default.txt
 | 
			
		||||
    $>  npm install
 | 
			
		||||
    $>  node tools/build.js -n
 | 
			
		||||
    $>  node tools/build.js
 | 
			
		||||
 | 
			
		||||
The resulting JS file will appear in the "build" directory of the Highlight.js
 | 
			
		||||
repo under the name "highlight.pack.js".
 | 
			
		||||
 | 
			
		||||
## Minification
 | 
			
		||||
 | 
			
		||||
Minify the file using closure-compiler using the command below.
 | 
			
		||||
 | 
			
		||||
    $> wget https://dl.google.com/closure-compiler/compiler-latest.zip
 | 
			
		||||
 | 
			
		||||
    $> unzip compiler-latest.zip
 | 
			
		||||
 | 
			
		||||
    $> mv closure-compiler-*.jar closure-compiler.jar
 | 
			
		||||
 | 
			
		||||
    $>  java -jar ./closure-compiler.jar \
 | 
			
		||||
            --js build/highlight.js \
 | 
			
		||||
            --js_output_file build/highlight.min.js
 | 
			
		||||
 | 
			
		||||
Copy the header comment that appears on the first line of
 | 
			
		||||
build/highlight.pack.js and add it to the start of build/highlight.min.js.
 | 
			
		||||
The resulting minified JS file will appear in the "build" directory of the Highlight.js
 | 
			
		||||
repo under the name "highlight.min.js".
 | 
			
		||||
 | 
			
		||||
## Finish
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4243
									
								
								lib/highlightjs/highlight.min.js
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4243
									
								
								lib/highlightjs/highlight.min.js
									
									
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							
		Reference in New Issue
	
	Block a user