<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>unageanu</author_name>
  <author_url>https://blog.hatena.ne.jp/unageanu/</author_url>
  <blog_title>うなの日記</blog_title>
  <blog_url>https://unageanu.hatenablog.com/</blog_url>
  <categories>
    <anon>JavaScript</anon>
  </categories>
  <description>表示範囲内に収まりきらない単語がある場合に、単語の途中でも改行させるようにする関数です。 アルファベットの前にゼロ幅スペース(&quot;​&quot;)を挿入して、改行できるようにします。 /** * アルファベットの前にゼロ幅スペース(&quot;&amp;#x200B;&quot;)を挿入して、 * 単語中での改行をサポートする。 */ function wordBreak( str ) { return str.replace(/(?=\w)/g, &quot;&amp;#x200B;&quot;); } サンプルは以下。通常は表示範囲内に入らなくても単語が途中で改行されることはありませんが、wordBreak()した文字列であれば途中で改行されます。 &lt;ht…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Funageanu.hatenablog.com%2Fentry%2F20090930%2F1254318861&quot; title=&quot; 単語内での改行を許可する関数 - うなの日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-09-30 22:54:21</published>
  <title> 単語内での改行を許可する関数</title>
  <type>rich</type>
  <url>https://unageanu.hatenablog.com/entry/20090930/1254318861</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
