Fix headline bug and add image support
- Add image tags support
- Add DIV tags support (will be tricked as general paragraph)
- Fix a problem with the lack of
\n\nbefore the headline so that the headline may be rendered to the last paragraph
BTW. The Xcode 16.0 reports an error indicating that the firstMatch(in: _) function may not be available in lower than iOS 16 (Sources/SwiftHTMLtoMarkdown/BasicHTML.swift:98). I have no idea if it is a critical issue because I have no errors encountered when I use this library with network reference. The error appears when I clone the library to the local and import it as a local library.
Here is a suggested fix authored by Xcode:
Thank you for making this PR! What are the changes to the Headers? I am seeing tests for those failing so I am wondering if the tests are incorrect because output was originally flawed.
Thank you for making this PR! What are the changes to the Headers? I am seeing tests for those failing so I am wondering if the tests are incorrect because output was originally flawed.
The headline will be rendered as a part of its last block (paragraph), not a single block, like this (all ##s should be h2 marks):
I doubt if it is an issue leading with the iOS SDK version. It may also cause the firstMatch (in: _) error I mentioned before, which will appear when I import the library directly from the cloned one instead of the GitHub repository. It may be evidence that there is no issue on your side with the last version of the code, for I am using Xcode beta version (16.0)