{"id":1438,"date":"2010-09-04T20:04:04","date_gmt":"2010-09-05T03:04:04","guid":{"rendered":"https:\/\/mathpirate.net\/log\/?p=1438"},"modified":"2010-09-05T00:21:22","modified_gmt":"2010-09-05T07:21:22","slug":"give-me-a-line-break","status":"publish","type":"post","link":"https:\/\/mathpirate.net\/log\/2010\/09\/04\/give-me-a-line-break\/","title":{"rendered":"Give Me A Line Break"},"content":{"rendered":"<p><em>The Congress shall have no Vote, unless they be equally divided.<\/em><\/p>\n<p>The way I&#8217;m parsing the text, it doesn&#8217;t like line breaks.<\/p>\n<p>The way I&#8217;m parsing the text, I didn&#8217;t pay any attention to new lines, other than trimming them out.\u00c2\u00a0 The problem with that is that is that the initial stage can only be the first word in the text, and the termination stage can only be the last word in the text.\u00c2\u00a0 While the termination stage doesn&#8217;t really matter, since it&#8217;s easy enough to put a limit on the number of words, the initial stage is critical.\u00c2\u00a0 If you only have one initial stage, then everything it says will start with the same exact words.<\/p>\n<p>The way I&#8217;m parsing the text, you can see how that would get annoying.<\/p>\n<p>The way I&#8217;m parsing the text, it had to change.<\/p>\n<p>So, I tried replacing all line breaks with special sentinel strings that would cause them to be treated as initiators and terminators.<\/p>\n<p>That had an odd side effect.<\/p>\n<p>Half the time I got no text.\u00c2\u00a0 Turns out there were cases that there were multiple line breaks in a row, so I was getting an initiator state followed immediately by a terminator.\u00c2\u00a0 Not terribly useful.<\/p>\n<p>Looks like I&#8217;ll have to work on that a bit&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Congress shall have no Vote, unless they be equally divided. The way I&#8217;m parsing the text, it doesn&#8217;t like line breaks. The way I&#8217;m parsing the text, I didn&#8217;t pay any attention to new lines, other than trimming them out.\u00c2\u00a0 The problem with that is that is that the initial stage can only be [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[161],"tags":[15,170],"_links":{"self":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1438"}],"collection":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/comments?post=1438"}],"version-history":[{"count":4,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1438\/revisions"}],"predecessor-version":[{"id":1501,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/posts\/1438\/revisions\/1501"}],"wp:attachment":[{"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/media?parent=1438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/categories?post=1438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mathpirate.net\/log\/wp-json\/wp\/v2\/tags?post=1438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}