-
Notifications
You must be signed in to change notification settings - Fork 146
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
Terminology changes #70
Comments
I think that a second property that uses the same backing field plus obsoleting the previous property. Heading sounds fine but the thematic break... I agree with your statement there :) As for the struct for header - on cmark it contains heading level and heading source type (atx or setext) which is currently in the BlockTag enumeration for us. I don't know if that is worth it (a struct should not impact GC - at least I think so) - in that it seemingly does not add any value. |
So
etc. Not very pretty IMHO, but will do. Re: struct I agree that it adds no value, but that would be consistent with |
I couldn't resist jumping on the opportunity with two renaming suggestions of my own: I updated the top post with these and turned it into a checklist. |
In case of the heading the struct would only have a single field - which is why it does not have its own struct yet. As for the weak emphasis and unordered list - both sounds fine with me but lets hear what people on the forum says. |
I guess the struct is a matter of personal taste. I renamed both headers and rulers in the extensions branch (leaving BTW having read through the topic, thematic break started to make more sense to me. I don't care that much for the specific nomenclature, but it is reasonable to call it something other than horizontal rule. As for an emphasis alternative, get ready for emphatic stress as a viable option 😱 |
Unlike with weak emphasis, which might be changed as proposed, changed to something unthinkable, or remain unchanged, I feel that unordered lists is the only correct term for what the spec calls bullet lists today. With that in mind, I went ahead and did a backwards-compatible rename. The state of lists in the extensions branch is now as follows:
Update: API Changes contains an updated version. |
I started documenting the API changes here. As you may see, I ultimately moved I believe that similarly turning |
Have you thought about any mechanisms how extensions like FancyLists would be supported from external assemblies that cannot modify Block and Inline classes? |
Extensively 😄 Lists are actually extensibility taken to the extreme. Adding a new list style is as easy as: public class FullWidthLowerAlphaLists : CommonMarkExtension
{
protected override IEnumerable<IBlockDelimiterHandler> InitializeBlockDelimiterHandlers(CommonMarkSettings settings)
{
var parameters = new OrderedListItemParameters('a', 'z', listStyle: "fullwidth-lower-alpha");
var delimiter = new ListItemDelimiterParameters('.');
yield return new AlphaListItemHandler(settings, parameters, delimiter);
}
} Numerous extensibility points are provided (a couple more added just today), so developing a custom extension should be a no-brainer. There is still the problem of autodiscovery, i.e. how to make external extensions available in the command line. I'm considering MEF, but adding an external dependency might be an issue (especially with .NET < 4.0). It looks like that warrants separate packages (e.g. P.S. MEF2 targets Profile 259. |
CommonMark 0.23 has been released. May I suggest that the same changes be applied before 0.11 (if you're planning on releasing one), i.e.
|
Yes, I don't see a reason for not doing this. If you merge the changes needed for 0.11 in master I could push the release to nuget. |
I'm currently working on disallowing space between link text and link label.
Any ideas? |
https://github.com/Knagis/CommonMark.NET/blob/master/CommonMark/Parser/InlineMethods.cs#L935 I suspect that it will be enough to remove the check for space and newline. |
Maybe my branch diverged too much from knagis/master, but that doesn't seem to solve the issue with this specific example. |
I will take a look at the new tests in a few hours. |
No need, solved in AMDL@da3c7bb. |
#71 ready for review. |
So the Professor is back on CommonMark, which is great news.
Somewhat less great is his renaming of core terms in both the spec and the C implementation (I understand those modifications are by popular demand -- I guess that's the price one has to pay when seeking community approval for their specification).
The following have changed so far:
The following are expected to change:
Should CommonMark.NET reflect those changes? I don't mind renaming everything, but wouldn't changing e.g.
HeaderLevel
toHeadingLevel
break compatibility?P.S. I noticed cmark has a separate struct for header/ing data. Maybe this is an opportunity to do the same here (while retaining an obsolete
HeaderLevel
property for the time being).The text was updated successfully, but these errors were encountered: