MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / get_dialogue

Function get_dialogue

src/command/edit.cpp:99–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97
98template<typename String>
99std::unique_ptr<AssDialogue> get_dialogue(String data) {
100 boost::trim(data);
101 try {
102 // Try to interpret the line as an ASS line
103 return std::make_unique<AssDialogue>(data);
104 }
105 catch (...) {
106 // Line didn't parse correctly, assume it's plain text that
107 // should be pasted in the Text field only
108 auto d = std::make_unique<AssDialogue>();
109 d->End = 0;
110 d->Text = data;
111 return d;
112 }
113}
114
115template<typename Paster>
116void paste_lines(agi::Context *c, bool paste_over, Paster&& paste_line) {

Callers 1

paste_linesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected