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

Consider changing handling of '<' and '>' characters in markdown documents #1791

Open
jayhawk87 opened this issue Jan 3, 2025 · 0 comments

Comments

@jayhawk87
Copy link
Contributor

Describe the bug

When trestle encounters the '<' or '>' characters, it considers these the start of an entity(?) tag and so consumes text until the next entity tag. As markdown linters use these characters to delineate bare HTML links, this can lead to strange error messages when comparing a document to it's template

To Reproduce

Steps to reproduce the behavior:

  1. Establish a markdown template
  2. Create a trestle document from the markdown template
  3. Insert HTML links (i.e. https:...) into the document, delineated by '<' and '>' characters (for example, 'http://www.google.com')
  4. Try to validate the document against the established template with trestle

Expected behavior

The document should pass the validation

Screenshots / Logs.

Example output as a result of this error:

Headings in the instance: /mnt/arch-design/ssad/privileged-access-gateway/privileged-access-gateway-ssad.md were removed. Expected 92 headings, but found only 88.
Heading #### Q.1.1 Personal IDs: in the instance: /mnt/arch-design/ssad/privileged-access-gateway/privileged-access-gateway-ssad.md was removed or not present
Heading #### Definitions: in the instance: /mnt/arch-design/ssad/privileged-access-gateway/privileged-access-gateway-ssad.md was removed or not present
Heading #### Definition: in the instance: /mnt/arch-design/ssad/privileged-access-gateway/privileged-access-gateway-ssad.md was removed or not present
INVALID: arch-design/ssad/privileged-access-gateway/privileged-access-gateway-ssad.md

If applicable, add screenshots to help explain your problem.

Environment

  • OS: MacOS
  • Python version: 3.11.11
  • Installed packages: standard trestle install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

No branches or pull requests

1 participant