File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -183,7 +183,30 @@ namespace My
183
183
self. node_ = self. node_. parent;
184
184
}
185
185
186
- // TODO? check here that the block we are leaving has the type we expect?
186
+ // Postprocess special blocks
187
+ while (self. node_. data. ty == BLOCK_SPECIAL ) { // do once
188
+ // Render the block's contents back to Markdown (TODO find a
189
+ // better way)
190
+ string inner_contents = " " ;
191
+
192
+
193
+ // Parse the text
194
+ var inner_reader = new MarkdownMd4cReader ();
195
+ // TODO copy reader options from this to inner_reader
196
+
197
+ Doc inner_doc = null ;
198
+ try {
199
+ inner_doc = inner_reader. read_string(inner_contents);
200
+ } catch (MarkupError e) {
201
+ lwarningo(self. node_,
202
+ " Could not parse special block's contents as Markdown: %s " ,
203
+ e. message);
204
+ break ;
205
+ }
206
+
207
+ // Replace the special block's children with the results
208
+ // of parsing the inner text
209
+ }
187
210
188
211
// Leave the current block
189
212
self. node_ = self. node_. parent;
You can’t perform that action at this time.
0 commit comments