Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error parsing standard input: Unmatched sequence on line #75

Open
dailson-igo opened this issue Oct 4, 2024 · 1 comment
Open

Error parsing standard input: Unmatched sequence on line #75

dailson-igo opened this issue Oct 4, 2024 · 1 comment

Comments

@dailson-igo
Copy link

Thank you for developing this add-on, it has helped us a lot. Could you help us resolve the error below?

I received the error below from ERB Formatter/Beautify. Later I discovered that if I remove the line break between "<path " and fill-rule="evenodd", keeping a space between the two, the problem is resolved on line 54, but it appears on line 98. I repeat the process and then it appears on line 143.
I tried to identify any illegal character in the file, but I couldn't find it.

Error formatting side_menu_component.html.erb: Formatting failed with exit code 1: /home/igo/.asdf/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/htmlbeautifier-1.4.3/bin/htmlbeautifier:12:in `rescue in beautify': Error parsing standard input: Unmatched sequence on line 54 (RuntimeError)

# after
Error parsing standard input: Unmatched sequence on line 98 (RuntimeError)

# after
Error parsing standard input: Unmatched sequence on line 143 (RuntimeError)
     [app/components/side_menu_component.html.erb]
       1 <aside class="w-64 h-screen" aria-label="Sidebar">
       2         <div class="overflow-y-auto py-4 px-3 bg-gray-50 rounded dark:bg-gray-800 h-full">
       3         <ul class="menu bg-base-200 rounded-box w-56">
       4     <div class="flex h-screen flex-col justify-between border-e bg-white">
       5       <div class="px-4 py-6">
       6         <span class="grid h-10 w-32 place-content-center rounded-lg bg-gray-100 text-xs text-gray-600">
       7           Logo
       8         </span>
       9 
      10             <ul class="mt-6 space-y-1">
      11           <li>
      12             <a
      13               href="#"
      14               class="block rounded-lg bg-gray-100 px-4 py-2 text-sm font-medium text-gray-700"
      15             >
      16               General
      17             </a>
      18           </li>
      19           
      20 
      21             <li>
      22                 <a
      23               href="#"
      24               class="block rounded-lg px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-700"
      25             >
      26               <%= nav_link('Início Live', root_path, 'fas fa-home') %>
      27             </a>
      28           </li>
      29 
      30           <li>
      31 
      32             <a
      33               href="#"
      34               class="block rounded-lg px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-700"
      35             >
      36               <%= nav_link('Sobre', about_path, 'fas fa-info-circle') %>
      37             </a>
      38           </li>
      39 
      40           <li>
      41             <details class="group [&_summary::-webkit-details-marker]:hidden">
      42               <summary
      43                 class="flex cursor-pointer items-center justify-between rounded-lg px-4 py-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700"
      44               >
      45                 <span class="text-sm font-medium"> Time </span>
      46 
      47                 <span class="shrink-0 transition duration-300 group-open:-rotate-180">
      48                   <svg
      49                     xmlns="http://www.w3.org/2000/svg"
      50                     class="size-5"
      51                     viewBox="0 0 20 20"
      52                     fill="currentColor"
      53                   >
      54                     <path
      55                       fill-rule="evenodd"
      56                       d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
      57                       clip-rule="evenodd"
      58                     />
      59                   </svg>
      60                 </span>
      61               </summary>
      62 
      63               <ul class="mt-2 space-y-1 px-4">
      64                 <li>
      65                   <a
      66                     href="#"
      67                     class="block rounded-lg px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-700"
      68                   >
      69                     Usuários Banidos
      70                   </a>
      71                 </li>
      72 
      73                 <li>
      74                   <a
      75                     href="#"
      76                     class="block rounded-lg px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-700"
      77                   >
      78                     Calendário
      79                   </a>
      80                 </li>
      81               </ul>
      82             </details>
      83           </li>
      84 
      85           <li>
      86             <details class="group [&_summary::-webkit-details-marker]:hidden">
      87               <summary
      88                 class="flex cursor-pointer items-center justify-between rounded-lg px-4 py-2 text-gray-500 hover:bg-gray-100 hover:text-gray-700"
      89               >
      90                 <span class="text-sm font-medium"> Conta </span>
      91 
      92                 <span class="shrink-0 transition duration-300 group-open:-rotate-180">
      93                   <svg
      94                     xmlns="http://www.w3.org/2000/svg"
      95                     class="size-5"
      96                     viewBox="0 0 20 20"
      97                     fill="currentColor"
      98                   >
      99                     <path
     100                       fill-rule="evenodd"
     101                       d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
     102                       clip-rule="evenodd"
     103                     />
     104                   </svg>
     105                 </span>
     106               </summary>
     107 
     108               <ul class="mt-2 space-y-1 px-4">
     109                 <li>
     110                   <a
     111                     href="#"
     112                     class="block rounded-lg px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-700"
     113                   >
     114                     Detalhes
     115                   </a>
     116                 </li>
     117 
     118                 <li>
     119                   <a
     120                     href="#"
     121                     class="block rounded-lg px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-100 hover:text-gray-700"
     122                   >
     123                     Segurança
     124                   </a>
     125                 </li>
     126 
     127                 <li>
     128                   <form action="#">
     129                     <button
     130                       type="submit"
     131                       class="w-full rounded-lg px-4 py-2 text-sm font-medium text-gray-500 [text-align:_inherit] hover:bg-gray-100 hover:text-gray-700"
     132                     >
     133                       Logout
     134                     </button>
     135                   </form>
     136                 </li>
     137               </ul>
     138             </details>
     139           </li>
     140         </ul>
     141       </div>
     142 
     143       <div class="sticky inset-x-0 bottom-0 border-t border-gray-100">
     144         <a href="#" class="flex items-center gap-2 bg-white p-4 hover:bg-gray-50">
     145           <img
     146             alt=""
     147             src="https://images.unsplash.com/photo-1600486913747-55e5470d6f40?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1770&q=80"
     148             class="size-10 rounded-full object-cover"
     149           />
     150 
     151           <div>
     152             <p class="text-xs">
     153               <strong class="block font-medium">Eric Frusciante</strong>
     154 
     155               <span> [email protected] </span>
     156             </p>
     157           </div>
     158         </a>
     159       </div>
     160     </div>
     161     </ul>
     162   </div>
     163 </aside>
@bertBruynooghe
Copy link

bertBruynooghe commented Dec 20, 2024

I noticed myself that the parser doesn't like self-closing tags. If you replace all /> with proper closing tags (<path ..></path>, <img ...></img>) in your case, the formatting will finish without run time errors.

However, this is not a problem of this extension, but of the htmlbeautifier gem.
I created a ticket there for this issue: threedaymonk/htmlbeautifier#87

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants