wylie.js
function putStackTogether(st) {
	var out = '';
	// put the main elements together... stacked with "+" unless it's a regular stack
	if (tib_stack(st.cons_str)) {
	    out += st.stack.join("");
	} else out += (st.cons_str);
	// caret (tsa-phru) goes here as per some (halfway broken) Unicode specs...
	if (st.caret) out += ("^");
	// vowels...
	if (st.vowels.length > 0) {
		out += st.vowels.join("+");
	} else if (!st.prefix && !st.suffix && !st.suff2
	&& (st.cons_str.length == 0 || st.cons_str.charAt(st.cons_str.length - 1) != 'a')) {
		out += "a"
	}
	// final stuff
	out += st.finals.join("");
	if (st.dot) out += ".";
	return out;
}
function putStackTogether(st) {
	var out = '';
	// put the main elements together... stacked with "+" unless it's a regular stack
	if (tib_stack(st.cons_str)) {
	    out += st.stack.join("");
	} else out += (st.cons_str);
	// caret (tsa-phru) goes here as per some (halfway broken) Unicode specs...
	if (st.caret) out += ("^");
	// vowels...
	if (st.vowels.length > 0) {
		out += st.vowels.join("+");
	} else if (!st.prefix && !st.suffix && !st.suff2
	&& (st.cons_str.length == 0 || st.cons_str.charAt(st.cons_str.length - 1) != 'a')) {
		out += "a"
	}
	// final stuff
	out += st.finals.join("");
	if (st.dot) out += ".";
	return out;
}
function putStackTogether ( st ) { var out = '' ; // put the main elements together... stacked with "+" unless it's a regular stack if ( tib_stack ( st . cons_str ) ) { out += st . stack . join ( "" ) ; } else out += ( st . cons_str ) ; // caret (tsa-phru) goes here as per some (halfway broken) Unicode specs... if ( st . caret ) out += ( "^" ) ; // vowels... if ( st . vowels . length > 0 ) { out += st . vowels . join ( "+" ) ; } else if ( ! st . prefix && ! st . suffix && ! st . suff2 && ( st . cons_str . length == 0 || st . cons_str . charAt ( st . cons_str . length - 1 ) != 'a' ) ) { out += "a" } // final stuff out += st . finals . join ( "" ) ; if ( st . dot ) out += "." ; return out ; }
Puts an analyzed stack together into Wylie output, adding an implicit "a" if needed.
Puts an analyzed stack together into Wylie output adding an implicit a if needed .