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 for inline elements #31

Closed
hmdne opened this issue Mar 13, 2024 · 3 comments
Closed

Support for inline elements #31

hmdne opened this issue Mar 13, 2024 · 3 comments
Assignees

Comments

@hmdne
Copy link
Contributor

hmdne commented Mar 13, 2024

Coradoc doesn't support parsing of inline elements, for instance:

  • styling (bold, italic)
  • hyperlinks
  • images
@webdev778
Copy link
Contributor

To implement reverse_adoc in terms of Coradoc, we would need
to at least create dummy classes that will handle those inline elements. @ronaldtse

@ronaldtse
Copy link
Contributor

@webdev778 yes we need to add all of these inline elements.

There are additional inline elements, see:

xyz65535 added a commit to xyz65535/coradoc that referenced this issue Apr 17, 2024
- metanorma#31 added classes for inline elements
- metanorma#10 added #to_adoc to Coradoc::Document classes based upon reverse_adoc code
- renamed numbered/unnumbered to ordered/unordered for consistency with metanorma/asciidoc
xyz65535 added a commit to xyz65535/coradoc that referenced this issue Apr 17, 2024
- metanorma#31 added classes for inline elements
- metanorma#10 added #to_adoc to Coradoc::Document classes based upon reverse_adoc code
- renamed numbered/unnumbered to ordered/unordered for consistency with metanorma/asciidoc
ronaldtse pushed a commit that referenced this issue Apr 23, 2024
- #31 added classes for inline elements
- #10 added #to_adoc to Coradoc::Document classes based upon reverse_adoc code
- renamed numbered/unnumbered to ordered/unordered for consistency with metanorma/asciidoc
@webdev778 webdev778 self-assigned this May 1, 2024
@ronaldtse
Copy link
Contributor

Done.

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
Archived in project
Development

No branches or pull requests

3 participants