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

Match erroneous punctuation in Verbatim-man-pages #1331

Closed

Conversation

seabass-labrax
Copy link
Contributor

@seabass-labrax seabass-labrax commented Sep 11, 2021

The trailing characters in the license text are likely to be removed upstream. However, as users of SPDX may wish to run automated license matchers on older files, this commit adds alt elements to match license texts containing the erroneous punctuation.

Related to issue #1310 and pull request #1319.

The trailing characters in the license text are likely to be removed
upstream. However, as users of SPDX may wish to run automated license
matchers on older files, this commit adds `alt` elements to match
license texts containing the erroneous punctuation.
@seabass-labrax
Copy link
Contributor Author

@goneall, I've checked the test output locally, and I'm a little concerned that the spacing="both" attribute doesn't seem to affect the whitespace of the generated HTML. Would you mind taking a look at this, please? Thanks :)


verbatim-alt-text

@goneall
Copy link
Member

goneall commented Sep 11, 2021

@seabass-labrax Looks like an issue with the LicenseListPublisher - I'll look into it after I finish up some of my Docfest tasks - may take a couple days.

@goneall
Copy link
Member

goneall commented Sep 12, 2021

I created a pull request which resolves this issue: spdx/LicenseListPublisher#122

I just added simple spaces to the HTML rather than using &nbsp - I'm not sure if there is any advantage/disadvantage to this approach but it seems to resolve the issue.

I plan on updating the version used to publish the website before the next license list release - this is tracked in issue #1323

Here's the output from the fixed LicenseListPublisher:

fixspacing

@seabass-labrax
Copy link
Contributor Author

Thank you, @goneall! I had looked in that file and found https://github.com/spdx/LicenseListPublisher/blob/cdb270cb95f2e1bb4517c2191d81f969aa4fb43c/src/org/spdx/licensexml/LicenseXmlHelper.java#L350-L353, but that turned out to be just for the optional text and not for replaceable text! Maybe we should combine the code into a single function that takes Element (be it optional or alt) and returns a string with the spacing added. What do you think? If you think it's a good idea I can have a go implementing that on the LicenseListPublisher repository :)

@swinslow, @jlovejoy - this pull request is now ready to merge! :)

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

Successfully merging this pull request may close these issues.

3 participants