For jQM 1.4 you can just apply white-space: normal in CSS to the anchor element:
<div class="ui-grid-a">
<div class="ui-block-a"><a href="index.html" data-role="button" >text a</a></div>
<div class="ui-block-b"><a href="index.html" data-role="button" >text b,text b</a> </div>
</div>
a {
white-space: normal !important;
}
jQM 1.4 DEMO
For jQM 1.3, the CSS is aplied to the .ui-btn-inner span of the anchor:
a .ui-btn-inner {
white-space: normal !important;
}
jQM 1.3 DEMO