0

MWE:

\documentclass[12pt]{article}
\usepackage[a4paper]{geometry}
\geometry{tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage{minted}
\begin{document}
\begin{minted}[breaklines, tabsize=2]{perl}
  $mech->agent('Mozilla/5.0 (X11; Linux i686; rv:45.0) Gecko/20100101 Firefox/45.0');
  $mech->get("http://turizm.user.control.new1.dev.website-url.com/hotels/save_add_hotel/");
\end{minted}
\end{document}

Output:

enter image description here

Extra shift was added, though no hyphenation. Is it possible to manually tell minted where to split the line like it did for Firefox, using space? The arrow is somehow related to tabulation of the string, but it is necessary for the code.

1
  • 1
    You might try something like breakafter=/ to enable other break locations besides spaces.
    – G. Poore
    Commented Jun 6, 2020 at 1:40

1 Answer 1

2

By default, minted only breaks lines at spaces. You can allow any break location with breakanywhere, or specify characters at which to break with breakbefore and breakafter. In this case, something like breakafter=/ would probably work well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .