daniellmb / markdownsharp

Automatically exported from code.google.com/p/markdownsharp
1 stars 0 forks source link

Patch (Refactoring) #8

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
- Removed all references to System.Collections (ArrayList).
- Dictionary initialization with C# 3.0 syntax (we already rely on C# 3.0 as 
we're using "var" so that's a non-issue in terms of dependencies).
- Pair structure was used to store tokens in a dirty way (it used the first 
string to store whether it's a text token or a tag. I used an enum instead to 
hold that value. I considered KeyValuePair<TokenType,string> too but decided 
against it as Token structure more clearly describes intent).

Original issue reported on code.google.com by mehi.afs...@gmail.com on 29 Dec 2009 at 9:37

Attachments:

GoogleCodeExporter commented 9 years ago
I really like this change -- much cleaner code! Folding it in now. The .patch 
file
was not in subversion format, which made it a bit awkward, and I had to do it 
by hand
-- can you check to make sure I did it right? The tests pass...

Original comment by wump...@gmail.com on 30 Dec 2009 at 2:15

GoogleCodeExporter commented 9 years ago
Looks fine to me. You can now remove the unnecessary `using 
System.Collections;` 
directive.

Yeah, it was GNU diff from the original Markdown.cs and mine. I couldn't submit 
a 
subversion patch since I cannot checkout the repository (Google Code blocks all 
IPs in 
our country and for some reason svn didn't work over my HTTP proxy so I had to 
manually 
browse the source and save it with a browser over an HTTP proxy). 

Original comment by mehi.afs...@gmail.com on 30 Dec 2009 at 2:38

GoogleCodeExporter commented 9 years ago
excellent, thanks for the contribution!

Original comment by wump...@gmail.com on 30 Dec 2009 at 7:24