jbe/bsw@0: --[[-- jbe/bsw@0: content = jbe/bsw@0: slot.get_content( jbe/bsw@0: slot_ident -- name of the slot jbe/bsw@0: ) jbe/bsw@0: jbe/bsw@0: This function returns the content of a chosen slot as a single string. jbe/bsw@0: jbe/bsw@0: --]]-- jbe/bsw@0: jbe/bsw@0: function slot.get_content(slot_ident) jbe/bsw@0: local slot_data = slot._data[slot_ident] jbe/bsw@0: if #slot_data.string_fragments > 1 then jbe/bsw@0: local str = table.concat(slot_data.string_fragments) jbe/bsw@0: slot_data.string_fragments = { str } jbe/bsw@0: return str jbe/bsw@0: else jbe/bsw@0: return slot_data.string_fragments[1] or "" jbe/bsw@0: end jbe/bsw@0: end