-
-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better handle markdown headings when editing issues #334
Comments
Haha, yeah I've been thinking about this a lot myself lately, interesting to see you bringing it back up. I'm really not sure what the best way to differentiate markdown from git comments when the default comment char Personally I have no interest in changing the comment char in |
It's definitely an interesting problem since it's not likely that people mix these two formats often. I'll have a look around and see if I can think of anything. |
I think in an edit context, I'm loading text that won't have comments. So perhaps could escape them all on load. Thoughts? ... Tired -- not sure if making sense |
I think you're making sense, and that's the approach I was going to
suggest. For the time being, there's always `:%s/^#/\\#/g`
|
I was going to suggest something similar, but escaping them on application exit instead. That way you could edit as if it's normal markdown and |
|
I'm not sure how this fixes the problem of supporting markdown headers that start with |
https://github.com/github/hub/blob/12083a59317dc879f26e2464974f175d4fd0a85b/github/editor.go#L86-L93 They read the content literally until the "scissors" line and then discard everything below it. So lines that begin with
|
Oh, that makes sense! That seems like a good solution, but the scissors line probably doesn't even matter unless |
In an edit context it probably doesn't make as much sense, because yeah, there might now be in other information to show. The cutline would mostly be useful for the create flows which include instructions at the bottom and a summary of commits when creating merge request. |
I think the biggest thing I got from the (Sorry if my vagueness is hard to follow and/or just totally incorrect... I still only partially understand what |
@jwkicklighter |
@zaquestion Let me know if there's any way I can help, since I keep bringing up these issues 🙂 |
It's pretty much just a matter of swapping in the hub logic, which shouldn't be too bad. LMK if you wanna try and take on implementation, I'm also talking with a potential new contributor and pointed them at this, but I'm not sure yet if they'll take it on, they might jump in somewhere else. So feel free to tackle it, it'll happen soon enough for sure. lab impl: https://github.com/zaquestion/lab/blob/master/internal/git/edit.go#L94-L107 And then adding the scizzors line into the edit templates. Below is the mr create one, but may need to get issue and snippet, but I think thats everything. (also fix tests) |
+1, the same happens to me 😄 |
#197 took care of being able to use
#
at the start of a line, but I just noticed that there isn't a great user flow for editing an issue that already has markdown headings.lab issue edit [ID]
I'm not sure what the best course would be, but perhaps requiring escaped hashes wasn't the best solution for #197.
The text was updated successfully, but these errors were encountered: