Skip to content

Conversation

@kivikakk
Copy link
Owner

Ref @sunjay's comment in #101; make this function accessible and straightforward to use. (Most users won't be assigning line numbers when constructing ASTs manually.)

@sunjay
Copy link
Contributor

sunjay commented Feb 12, 2019

This is great! Thanks for adding it! What do you think about making this a method on Ast?

impl Ast {
    pub fn new(value: NodeValue) -> Self {
        //...
    }
}

I think this is probably closer to what Rust programmers typically expect. :)

@kivikakk
Copy link
Owner Author

Of course! I'm too used to the codebase to notice this kind of mistake; thanks for the pickup!

@kivikakk kivikakk changed the title make_block -> make_ast, expose make_block -> Ast::new, expose Feb 12, 2019
Copy link
Contributor

@sunjay sunjay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this! This is fantastic! 😄

@kivikakk
Copy link
Owner Author

My pleasure! Thanks for bringing these kinds of changes to my attention. I'm not currently an active user of the library so having people who are using it participate in its development is the best! 👍

@kivikakk kivikakk merged commit 9c14bf1 into master Feb 12, 2019
@kivikakk kivikakk deleted the make-ast branch February 12, 2019 04:44
@sunjay
Copy link
Contributor

sunjay commented Feb 13, 2019

Hi @kivikakk! Could you release a new patch version when you have the opportunity? I'd love to get these latest changes released so I can start using them. 😄

@kivikakk
Copy link
Owner Author

@sunjay Of course, done! https://crates.io/crates/comrak/0.4.3

@sunjay
Copy link
Contributor

sunjay commented Feb 13, 2019

Thank you very much! 😍 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants