@@ -78,7 +78,7 @@ public void head(Node node, int depth) {
7878 if (!text .trim ().isEmpty ()) {
7979 if (text .startsWith (":param " )) {
8080 int secondColonIndex = text .indexOf (':' , 1 );
81- writer .write (text .substring (0 , secondColonIndex + 1 ));
81+ writer .write ("$L" , text .substring (0 , secondColonIndex + 1 ));
8282 //TODO right now the code generator gives us a mixture of
8383 // RST and HTML (for instance :param xyz: <p> docs
8484 // </p>). Since we standardize to html above, that <p> tag
@@ -91,16 +91,16 @@ public void head(Node node, int depth) {
9191 } else {
9292 writer .ensureNewline ();
9393 writer .indent ();
94- writer .write (text .substring (secondColonIndex + 1 ));
94+ writer .write ("$L" , text .substring (secondColonIndex + 1 ));
9595 writer .dedent ();
9696 }
9797 } else {
98- writer .writeInline (text );
98+ writer .writeInline ("$L" , text );
9999 }
100100 // Account for services making a paragraph tag that's empty except
101101 // for a newline
102102 } else if (node .parent () != null && ((Element ) node .parent ()).tagName ().equals ("p" )) {
103- writer .writeInline (text .replaceAll ("[ \\ t]+" , "" ));
103+ writer .writeInline ("$L" , text .replaceAll ("[ \\ t]+" , "" ));
104104 }
105105 } else if (node instanceof Element ) {
106106 Element element = (Element ) node ;
@@ -158,7 +158,7 @@ public void tail(Node node, int depth) {
158158 case "a" :
159159 String href = element .attr ("href" );
160160 if (!href .isEmpty ()) {
161- writer .writeInline (" <" ).writeInline (href ).writeInline (">`_" );
161+ writer .writeInline (" <" ).writeInline ("$L" , href ).writeInline (">`_" );
162162 } else {
163163 writer .writeInline ("`" );
164164 }
@@ -196,7 +196,7 @@ public void tail(Node node, int depth) {
196196 break ;
197197 case "h1" :
198198 String title = element .text ();
199- writer .ensureNewline ().writeInline ("=" .repeat (title .length ())).ensureNewline ();
199+ writer .ensureNewline ().writeInline ("$L" , " =" .repeat (title .length ())).ensureNewline ();
200200 break ;
201201 default :
202202 break ;
0 commit comments