marked-forms.js
function link(href, title, text) {

  var reLabelFirst = /^(.*?)\s*\?([^?\s]*)\?(\*?)(X?)(H?)$/;
  var reLabelAfter = /^\?([^?\s]*)\?(\*?)(X?)(H?)\s*(.*)$/;

  var m = text.match(reLabelFirst);
  if (m) return renderInput(m[1], m[2], m[3], m[4], m[5], href, title, true);

  m = text.match(reLabelAfter);
  if (m) return renderInput(m[5], m[1], m[2], m[3], m[4], href, title, false);

  return fallback.link.call(this, href, title, text);
}
function link(href, title, text) {

  var reLabelFirst = /^(.*?)\s*\?([^?\s]*)\?(\*?)(X?)(H?)$/;
  var reLabelAfter = /^\?([^?\s]*)\?(\*?)(X?)(H?)\s*(.*)$/;

  var m = text.match(reLabelFirst);
  if (m) return renderInput(m[1], m[2], m[3], m[4], m[5], href, title, true);

  m = text.match(reLabelAfter);
  if (m) return renderInput(m[5], m[1], m[2], m[3], m[4], href, title, false);

  return fallback.link.call(this, href, title, text);
}
function link ( href , title , text ) { var reLabelFirst = / ^(.*?)\s*\?([^?\s]*)\?(\*?)(X?)(H?)$ / ; var reLabelAfter = / ^\?([^?\s]*)\?(\*?)(X?)(H?)\s*(.*)$ / ; var m = text . match ( reLabelFirst ) ; if ( m ) return renderInput ( m [ 1 ] , m [ 2 ] , m [ 3 ] , m [ 4 ] , m [ 5 ] , href , title , true ) ; m = text . match ( reLabelAfter ) ; if ( m ) return renderInput ( m [ 5 ] , m [ 1 ] , m [ 2 ] , m [ 3 ] , m [ 4 ] , href , title , false ) ; return fallback . link . call ( this , href , title , text ) ; }
markdown link syntax extension for forms
markdown link syntax extension for forms