66package software .amazon .smithy .docgen .core .integrations ;
77
88import static java .lang .String .format ;
9+ import static software .amazon .smithy .docgen .core .DocgenUtils .normalizeNewlines ;
910import static software .amazon .smithy .docgen .core .DocgenUtils .runCommand ;
1011
1112import java .util .List ;
@@ -234,25 +235,27 @@ private void runSphinx(DocGenerationContext context) {
234235 // Finally, run sphinx itself.
235236 runCommand ("./venv/bin/sphinx-build -M dirhtml content build" , baseDir );
236237
237- System .out .printf ("""
238- Successfully built HTML docs. They can be found in "%1$s".\
239- %n%n\
238+ System .out .printf (normalizeNewlines ( """
239+ Successfully built HTML docs. They can be found in "%1$s".
240+
240241 Other output formats can also be built. A python virtual environment \
241242 has been created at "%2$s" containing the build tools needed for \
242243 manually building the docs in other formats. See the virtual \
243244 environment docs for information on how to activate it: \
244- https://docs.python.org/3/library/venv.html#how-venvs-work\
245- %n%n\
245+ https://docs.python.org/3/library/venv.html#how-venvs-work
246+
246247 Once the environment is activated, run `make dirhtml` from "%3$s" to \
247248 to build the docs, substituting dirhtml for whatever format you wish \
248- to build.\
249- %n%n\
249+ to build.
250+
250251 To build the docs without activating the virtual environment, simply \
251252 run `./venv/bin/sphinx-build -M dirhtml content build` from "%3$s", \
252- similarly substituting dirhtml for your desired format.\
253- %n%n\
253+ similarly substituting dirhtml for your desired format.
254+
254255 See sphinx docs for other output formats you can choose: \
255- https://www.sphinx-doc.org/en/master/usage/builders/index.html%n%n""" ,
256+ https://www.sphinx-doc.org/en/master/usage/builders/index.html
257+
258+ """ ),
256259 baseDir .resolve ("build/dirhtml" ),
257260 baseDir .resolve ("venv" ),
258261 baseDir
@@ -265,18 +268,20 @@ private void runSphinx(DocGenerationContext context) {
265268
266269 private void logManualBuildInstructions (DocGenerationContext context ) {
267270 // TODO: try to get this printed out in the projection section
268- System .out .printf ("""
271+ System .out .printf (normalizeNewlines ( """
269272 To build the HTML docs manually, you need to first install the python \
270273 dependencies. These can be found in the `requirements.txt` file in \
271274 "%1$s". The easiest way to install these is by running `pip install \
272275 -r requirements.txt`. Depending on your environment, you may need to \
273276 instead install them from your system package manager, or another \
274- source.\
275- %n%n\
277+ source.
278+
276279 Once the dependencies are installed, run `make dirhtml` from \
277280 "%1$s". Other output formats can also be built. See sphinx docs for \
278281 other output formats: \
279- https://www.sphinx-doc.org/en/master/usage/builders/index.html%n%n""" ,
282+ https://www.sphinx-doc.org/en/master/usage/builders/index.html
283+
284+ """ ),
280285 context .fileManifest ().getBaseDir ()
281286 );
282287 }
0 commit comments