YarnMarkupParser
parses yarn spinner markup and transforms it using registered processors. uses YarnLineParser internally with a backwards-compatible API.
class_name YarnMarkupParser
extends RefCountedInherits from RefCounted
#Constants
#BBCODE_TAG_END
const BBCODE_TAG_END = ""#BBCODE_TAG_START
const BBCODE_TAG_START = ""#Properties
#locale_code
var locale_code: String = "en"Type String
#Methods
#bbcode_tag(String)
static func bbcode_tag(tag: String) -> StringParameters
tagString
Returns String
#brackets_to_tags(String)
static func brackets_to_tags(bbcode: String) -> StringParameters
bbcodeString
Returns String
#convert_to_bbcode(YarnMarkupParseResult)
func convert_to_bbcode(parse_result: YarnMarkupParseResult) -> StringParameters
parse_resultYarnMarkupParseResult
Returns String
#deregister_marker_processor(String)
func deregister_marker_processor(attribute_name: String) -> voidParameters
attribute_nameString
#escape_text(String)
static func escape_text(text: String) -> StringParameters
textString
Returns String
#get_palette_processor()
func get_palette_processor() -> YarnPaletteMarkupProcessorReturns YarnPaletteMarkupProcessor
#get_style_processor()
func get_style_processor() -> YarnStyleMarkupProcessorReturns YarnStyleMarkupProcessor
#parse_to_result(String, bool)
parse markup and return a YarnMarkupParseResult.
func parse_to_result(text: String, add_implicit_character: bool = true) -> YarnMarkupParseResultParameters
textStringadd_implicit_characterbool
Returns YarnMarkupParseResult
#parse(String)
parse markup in text and return processed result (backwards-compatible API) returns a dictionary with: - text: the processed text with BBCode - character_name: extracted character name (empty if none) - attributes: array of parsed attribute info supports escaping: \[ and \] for literal brackets
func parse(text: String) -> DictionaryParameters
textString
Returns Dictionary
#register_marker_processor(String, YarnAttributeMarkerProcessor)
func register_marker_processor(attribute_name: String, processor: YarnAttributeMarkerProcessor) -> voidParameters
attribute_nameStringprocessorYarnAttributeMarkerProcessor
#register_processor(YarnMarkupAttributeProcessor)
func register_processor(processor: YarnMarkupAttributeProcessor) -> voidParameters
processorYarnMarkupAttributeProcessor
#strip_bbcode_tags(String)
static func strip_bbcode_tags(text: String) -> StringParameters
textString
Returns String
#unregister_processor(YarnMarkupAttributeProcessor)
func unregister_processor(processor: YarnMarkupAttributeProcessor) -> voidParameters
processorYarnMarkupAttributeProcessor
Generated from Yarn Spinner for Godot GDScript 3.3.