Skip to content
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

Preref parser for auto-detected title, description and details #364

Closed
gaborcsardi opened this issue Aug 4, 2015 · 3 comments
Closed

Preref parser for auto-detected title, description and details #364

gaborcsardi opened this issue Aug 4, 2015 · 3 comments

Comments

@gaborcsardi
Copy link
Collaborator

@gaborcsardi gaborcsardi commented Aug 4, 2015

The registered parsers are only called if the @title, @description and @details tags are used explicitly, but not if they are just extracted from the first and second paragraphs and the rest.

It would be great if they could be called from process_description as well.

@gaborcsardi gaborcsardi mentioned this issue Aug 4, 2015
@hadley
Copy link
Member

@hadley hadley commented Aug 5, 2015

PR would be great :)

@gaborcsardi
Copy link
Collaborator Author

@gaborcsardi gaborcsardi commented Aug 5, 2015

This part is a bit messy in roxygen. First the file is split on @, and all tags call their preref parsers. The initial part does not have a @ tag, so that is left out from this process, and passed along as introduction. Then, at a higher level, process_description is called, which splits this initial part into @title, @description and @details.

@details is especially tricky, because process_description merges the @details tag (if present) with the leftover of the intro, so the preref parser is sometimes only called on part of the real @details.

I think the splitting done in process_description should be done in parse.preref, conceptually. Instead of or in addition to just passing along introduction. As I see it, this is a clean change, process_description does not do anything else in addition to the splitting.

Please let me know if I am missing something.

@hadley
Copy link
Member

@hadley hadley commented Aug 5, 2015

That seems reasonable to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants