Some Markdown fixes and additions.#658
Open
not-jakob wants to merge 2 commits into
Open
Conversation
Added escape character . Added alerts. Added [x] with a small x for task higlighting. Improved square bracket highlighting when using repeated square brackets.
obiwanus
reviewed
May 20, 2026
Collaborator
obiwanus
left a comment
There was a problem hiding this comment.
Please can you also add a test document to the preview which demonstrates the new additions
| } else if is_digit(char) { | ||
| parse_number(tokenizer, *token); | ||
| } else { | ||
| did_not_found_char := false; |
Collaborator
There was a problem hiding this comment.
Suggested change
| did_not_found_char := false; | |
| did_not_find_char := false; |
| case #char "<"; parse_less_than(tokenizer, *token); | ||
| case #char "\\"; token.type = .default; t += 2; | ||
| case; | ||
| did_not_found_char = true; |
Collaborator
There was a problem hiding this comment.
Suggested change
| did_not_found_char = true; | |
| did_not_find_char = true; |
| } | ||
|
|
||
| // Only after any whitespace. | ||
| if did_not_found_char && found_whitespace { |
Collaborator
There was a problem hiding this comment.
Suggested change
| if did_not_found_char && found_whitespace { | |
| if did_not_find_char && found_whitespace { |
| t += 1; | ||
| identifier_str := read_identifier_string_tmp(tokenizer, stop_at_char = #char "\n", stop_at_white_space = false); | ||
|
|
||
| found_allert := false; |
Collaborator
There was a problem hiding this comment.
Suggested change
| found_allert := false; | |
| found_alert := false; |
| for alerts { | ||
| if begins_with(identifier_str, it.opening_tag) { | ||
| token.type = it.type; | ||
| found_allert = true; |
Collaborator
There was a problem hiding this comment.
Suggested change
| found_allert = true; | |
| found_alert = true; |
| } | ||
| } | ||
|
|
||
| if !found_allert { |
Collaborator
There was a problem hiding this comment.
Suggested change
| if !found_allert { | |
| if !found_alert { |
Author
|
Can i add it here? |
Collaborator
|
What I meant was extending the markdown sample here: https://github.com/focus-editor/focus/blob/main/src/widgets/color_preview_samples.jai |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added escape character .
Added alerts.
Added [x] with a small x for task higlighting.
Improved square bracket highlighting when using repeated square brackets.