Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added some default text to the editor
i couldn't do this before, because i didn't know how to make Blazor react to the pre-set text (located at `Index.razor:11`) upon page load. i searched and found some overridable Blazor functions that might help. the "on initialize" function occurs too soon; the default text isn't accessible yet. the "on after render" function is what i needed; it occurs a bit later in the Blazor lifecycle, allowing the overlay to update using the pre-set `textarea` content. we also have a minor rule change with the `---` lines: you may now include spaces/tabs immediately following the `-` dashes. and lastly, a fix: the regular expression for the "mono" formatting (the `\`` via back-tick character) was incorrect. when searching for content between the two back-ticks, the pattern was excluding the `_` underscore character, but it should have excluded the back-tick. a classic _copy-paste_ bug: i copied from the "italic" pattern, but failed to make all the necessary changes to the duplicated code. typing ``` above made me realize that the pattern did _not_ handle that scenario. i started trying to fix this by allowing the content between back-ticks to be a single back-tick. however, three consecutive back-ticks is meant to be the start of "multiline mono" formatting. and the fix still doesn't address the next problem: how do i show _two_ back-ticks in a "mono" black? i think the solution will be to "escape" the inner back-ticks using a `\` backslash character as a prefix (for example: `\``). this does not seem like an important issue. i am naturally driven to fix it anyway, but it's more important to prioritize and stay on track. i'll document it as a known issue.
- Loading branch information