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

start_line of paragraph following =item * is lost #146

Open
haarg opened this issue Aug 22, 2022 · 1 comment
Open

start_line of paragraph following =item * is lost #146

haarg opened this issue Aug 22, 2022 · 1 comment

Comments

@haarg
Copy link
Contributor

haarg commented Aug 22, 2022

Given the following Pod content:

=over 4

=item *

Hi

=back

The output from Pod::Simple::DumpAsXML looks like the following:

<Document start_line="1">
  <over-bullet indent="4" start_line="1">
    <item-bullet start_line="3">
      Hi
    </item-bullet>
  </over-bullet>
</Document>

This shows the =item starting at line 3, but there is no information about where the Hi starts.

If we add some extra lines after the =item *:

=over 4

=item *




Hi

=back

The output will be identical. This makes it impossible to track the line number of content in this paragraph.

Normally, a paragraph would generate a ~Para element in the event stream, but for item-bullet, it folds the content of that ~Para into the =item event, losing the ~Para's attributes. I don't think the behavior of folding the paragraph in can be changed, as too many things rely on it. But it should be possible to at least maintain the attributes. I'm not sure the best way to name them though. Should it copy all of the attributes with a prefix of ~Para_? Should it only copy the start_line, giving it a name like para_start_line? Or maybe the folding behavior can be changed, based on an option.

@haarg
Copy link
Contributor Author

haarg commented Aug 22, 2022

This also impacts item-number.

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

No branches or pull requests

1 participant