@@ -92,13 +92,13 @@ For Closure imports, `protoc` will generate a single output file
9292(` myproto_libs.js ` in this example). The generated file will ` goog.provide() `
9393all of the types defined in your .proto files. For example, for the unit
9494tests the generated files contain many ` goog.provide ` statements like:
95-
95+ ``` js
9696 goog .provide (' proto.google.protobuf.DescriptorProto' );
9797 goog .provide (' proto.google.protobuf.DescriptorProto.ExtensionRange' );
9898 goog .provide (' proto.google.protobuf.DescriptorProto.ReservedRange' );
9999 goog .provide (' proto.google.protobuf.EnumDescriptorProto' );
100100 goog .provide (' proto.google.protobuf.EnumOptions' );
101-
101+ ```
102102The generated code will also ` goog.require() ` many types in the core library,
103103and they will require many types in the Google Closure library. So make sure
104104that your ` goog.provide() ` / ` goog.require() ` setup can find all of your
@@ -107,11 +107,11 @@ Google Closure library itself.
107107
108108Once you've done this, you should be able to import your types with
109109statements like:
110-
110+ ``` js
111111 goog .require (' proto.my.package.MyMessage' );
112112
113113 var message = proto .my .package .MyMessage ();
114-
114+ ```
115115If unfamiliar with Closure or its compiler, consider reviewing
116116[ Closure documentation] ( https://developers.google.com/closure/library ) .
117117
@@ -134,11 +134,11 @@ to build it first by running:
134134
135135Once you've done this, you should be able to import your types with
136136statements like:
137-
137+ ``` js
138138 var messages = require (' ./messages_pb' );
139139
140140 var message = new messages.MyMessage ();
141-
141+ ```
142142The ` --js_out ` flag
143143-------------------
144144
165165
166166The API is not well-documented yet. Here is a quick example to give you an
167167idea of how the library generally works:
168-
168+ ``` js
169169 var message = new MyMessage ();
170170
171171 message .setName (" John Doe" );
@@ -176,6 +176,6 @@ idea of how the library generally works:
176176 var bytes = message .serializeBinary ();
177177
178178 var message2 = MyMessage .deserializeBinary (bytes);
179-
179+ ```
180180For more examples, see the tests. You can also look at the generated code
181181to see what methods are defined for your generated messages.
0 commit comments