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

features(types/renderer): Table cols attribute support #698

Merged
merged 1 commit into from
Jul 6, 2020

Conversation

gdamore
Copy link
Collaborator

@gdamore gdamore commented Jul 5, 2020

This adds support for handling the cols attribute ont tables,
giving the ability specify per column widths and alignments.
It also supports the repeat syntax, and the ability to set
autoexpand (either for the entire table or for an individual row).

The width handling and calculations were moved to instantiation
time for the Table, so that all backends can benefit from the
calculation work done for these.

The style component of the column specification is consumed and
stored, but does not affect deeper parsing or rendering yet.

This takes table support about as far as it can go without
reworking the parser to provide context-sensitive parsing of
the table contents.

While here the limitations document was updated to provide more
detail on limitations, including links to issues for folks
who want to track progress.

Fixes #694
Fixes #686

gdamore added a commit to gdamore/libasciidoc that referenced this pull request Jul 5, 2020
…#698)

This adds support for handling the cols attribute ont tables,
giving the ability specify per column widths and alignments.
It also supports the repeat syntax, and the ability to set
autoexpand (either for the entire table or for an individual row).

The width handling and calculations were moved to instantiation
time for the Table, so that all backends can benefit from the
calculation work done for these.

The style component of the column specification is consumed and
stored, but does not affect deeper parsing or rendering yet.

This takes table support about as far as it can go without
reworking the parser to provide context-sensitive parsing of
the table contents.

While here the limitations document was updated to provide more
detail on limitations, including links to issues for folks
who want to track progress.

Fixes bytesparadise#694
Fixes bytesparadise#686
@gdamore
Copy link
Collaborator Author

gdamore commented Jul 5, 2020

Full rebased now.

I believe this PR substantially increases the number of tables in the wild that will be handled correctly.

@codecov
Copy link

codecov bot commented Jul 5, 2020

Codecov Report

Merging #698 into master will increase coverage by 0.00%.
The diff coverage is 88.82%.

@@           Coverage Diff           @@
##           master     #698   +/-   ##
=======================================
  Coverage   84.43%   84.44%           
=======================================
  Files          74       75    +1     
  Lines        5024     5123   +99     
=======================================
+ Hits         4242     4326   +84     
- Misses        501      512   +11     
- Partials      281      285    +4     

…#698)

This adds support for handling the cols attribute ont tables,
giving the ability specify per column widths and alignments.
It also supports the repeat syntax, and the ability to set
autoexpand (either for the entire table or for an individual row).

The width handling and calculations were moved to instantiation
time for the Table, so that all backends can benefit from the
calculation work done for these.

The style component of the column specification is consumed and
stored, but does not affect deeper parsing or rendering yet.

This takes table support about as far as it can go without
reworking the parser to provide context-sensitive parsing of
the table contents.

While here the limitations document was updated to provide more
detail on limitations, including links to issues for folks
who want to track progress.

Fixes bytesparadise#694
Fixes bytesparadise#686
Copy link
Member

@xcoulon xcoulon left a comment

Choose a reason for hiding this comment

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

very impressive work @gdamore 👏
reading and converting the column width and alignment attributes must have been a daunting task 😱

@xcoulon xcoulon merged commit 122f8da into bytesparadise:master Jul 6, 2020
@xcoulon
Copy link
Member

xcoulon commented Jul 6, 2020

also, thanks for the big update in LIMITATIONS.adoc 👍

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