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

Some code will cause satori to loop indefinitely immediately #633

Open
Zxilly opened this issue Sep 1, 2024 · 1 comment
Open

Some code will cause satori to loop indefinitely immediately #633

Zxilly opened this issue Sep 1, 2024 · 1 comment

Comments

@Zxilly
Copy link

Zxilly commented Sep 1, 2024

Bug report

When satori tries to render the following code it immediately falls into a dead loop, both in the browser and in node

Description / Observed Behavior

Just try to render the following template

Expected Behavior

Got a rendered svg.

Reproduction

I can't create a share link because the whole page gets stuck as soon as I enter this code

<div
  style={{
    width: '100%',
    height: '100%',
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#f0f0f0',
    padding: '40px',
    fontFamily: 'HarmonyOS_Sans, JetBrains Mono, sans-serif',
  }}
>
  <div
    style={{
      width: '100%',
      maxWidth: '800px',
      backgroundColor: 'white',
      borderRadius: '16px',
      padding: '24px',
      boxShadow: '0 4px 6px rgba(0, 0, 0, 0.1)',
    }}
  >
    <div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' }}>
      <div style={{ flex: 1, marginRight: '20px' }}>
        <h2 style={{ margin: '0 0 8px 0', fontSize: '18px' }}>仓颉 Playground</h2>
        <p style={{ margin: 0, fontSize: '14px', wordBreak: 'break-all' }}>
          "A link string"
        </p>
      </div>
    </div>
  </div>
</div>

Additional Context

Edge 128.0.2739.54 and Node.js v22.3.0

@Zxilly
Copy link
Author

Zxilly commented Sep 2, 2024

remove wordBreak: 'break-all' can resolve this

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

1 participant