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

Support parsing comments #25

Closed
HassanAkbar opened this issue Jul 18, 2023 · 1 comment · Fixed by #106
Closed

Support parsing comments #25

HassanAkbar opened this issue Jul 18, 2023 · 1 comment · Fixed by #106
Assignees

Comments

@HassanAkbar
Copy link
Member

Add support to parse comments in adoc files.

@ronaldtse
Copy link
Contributor

@webdev778 @hmdne is this done? Are we able to round-trip comments?

xyz65535 added a commit to xyz65535/coradoc that referenced this issue Jun 22, 2024
metanorma#15 done
metanorma#16 added cross_references parser + transformer
metanorma#25 done
metanorma#31 missing parser code for parsing inline ellements in text
metanorma#36 created parser for attribute list for further use
metanorma#37 done parser for definition lists

- moved some code from lib/coradoc/parser/asciidoc/content.rb info appropriate files like block.rb, list.rb, paragraph.rb, table.rb
- created parser rules for comments, include + Coradoc::Element classes
- created parser rules for attribute list, comments, admonition
- created rspec for attribute list
- created parser rules for definition list, with the goal of it replacing glossaries rules
- created parser rules for bold / highlight / italic, cross_reference
- created transformer rules for attribute list, comments, include, text elements, inlines
- fixed some things required for round-trip, for example  to_adoc method in Coradoc::Element::TextElement now outputs all the information
- created parslet rule called "text_formatted", it's purpose will be to handle parsing inline elements within the text, that's still WIP
- fixed some minor bugs that popped out during development of other things, for example olist_item parsing collided with sidebar block delimiter (****)
- changed maybe to repeat(0) in multiple methods in Parser::Asciidoc::Section, this way instead of sometimes returning an empty string they always return an array even if it has 0 elements, this should allow to decrease number of transformer rules

Co-authored-by: hmdne <54514036+hmdne@users.noreply.github.com>
xyz65535 added a commit to xyz65535/coradoc that referenced this issue Jun 22, 2024
metanorma#15 done
metanorma#16 added cross_references parser + transformer
metanorma#25 done
metanorma#31 missing parser code for parsing inline ellements in text
metanorma#36 created parser for attribute list for further use
metanorma#37 done parser for definition lists

- moved some code from lib/coradoc/parser/asciidoc/content.rb info appropriate files like block.rb, list.rb, paragraph.rb, table.rb
- created parser rules for comments, include + Coradoc::Element classes
- created parser rules for attribute list, comments, admonition
- created rspec for attribute list
- created parser rules for definition list, with the goal of it replacing glossaries rules
- created parser rules for bold / highlight / italic, cross_reference
- created transformer rules for attribute list, comments, include, text elements, inlines
- fixed some things required for round-trip, for example  to_adoc method in Coradoc::Element::TextElement now outputs all the information
- created parslet rule called "text_formatted", it's purpose will be to handle parsing inline elements within the text, that's still WIP
- fixed some minor bugs that popped out during development of other things, for example olist_item parsing collided with sidebar block delimiter (****)
- changed maybe to repeat(0) in multiple methods in Parser::Asciidoc::Section, this way instead of sometimes returning an empty string they always return an array even if it has 0 elements, this should allow to decrease number of transformer rules

Co-authored-by: hmdne <54514036+hmdne@users.noreply.github.com>

draft

metanorma#15 done
metanorma#16 added cross_references parser + transformer
metanorma#25 done
metanorma#31 missing parser code for parsing inline ellements in text
metanorma#36 created parser for attribute list for further use
metanorma#37 done parser for definition lists

- moved some code from lib/coradoc/parser/asciidoc/content.rb info appropriate files like block.rb, list.rb, paragraph.rb, table.rb
- created parser rules for comments, include + Coradoc::Element classes
- created parser rules for attribute list, comments, admonition
- created rspec for attribute list
- created parser rules for definition list, with the goal of it replacing glossaries rules
- created parser rules for bold / highlight / italic, cross_reference
- created transformer rules for attribute list, comments, include, text elements, inlines
- fixed some things required for round-trip, for example  to_adoc method in Coradoc::Element::TextElement now outputs all the information
- created parslet rule called "text_formatted", it's purpose will be to handle parsing inline elements within the text, that's still WIP
- fixed some minor bugs that popped out during development of other things, for example olist_item parsing collided with sidebar block delimiter (****)
- changed maybe to repeat(0) in multiple methods in Parser::Asciidoc::Section, this way instead of sometimes returning an empty string they always return an array even if it has 0 elements, this should allow to decrease number of transformer rules

Co-authored-by: hmdne <54514036+hmdne@users.noreply.github.com>
xyz65535 added a commit to xyz65535/coradoc that referenced this issue Jun 22, 2024
metanorma#15 done
metanorma#16 added cross_references parser + transformer
metanorma#25 done
metanorma#31 missing parser code for parsing inline ellements in text
metanorma#36 created parser for attribute list for further use
metanorma#37 done parser for definition lists

- moved some code from lib/coradoc/parser/asciidoc/content.rb info appropriate files like block.rb, list.rb, paragraph.rb, table.rb
- created parser rules for comments, include + Coradoc::Element classes
- created parser rules for attribute list, comments, admonition
- created rspec for attribute list
- created parser rules for definition list, with the goal of it replacing glossaries rules
- created parser rules for bold / highlight / italic, cross_reference
- created transformer rules for attribute list, comments, include, text elements, inlines
- fixed some things required for round-trip, for example  to_adoc method in Coradoc::Element::TextElement now outputs all the information
- created parslet rule called "text_formatted", it's purpose will be to handle parsing inline elements within the text, that's still WIP
- fixed some minor bugs that popped out during development of other things, for example olist_item parsing collided with sidebar block delimiter (****)
- changed maybe to repeat(0) in multiple methods in Parser::Asciidoc::Section, this way instead of sometimes returning an empty string they always return an array even if it has 0 elements, this should allow to decrease number of transformer rules

Co-authored-by: hmdne <54514036+hmdne@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants