markd icon indicating copy to clipboard operation
markd copied to clipboard

Update codebase to current Crystal

Open devnote-dev opened this issue 3 years ago • 1 comments

A lot of the codebase seems to be using code that was likely before the Crystal 1.0 release, and while parts of the library have been updated in recent-ish updates, a lot of it still uses old or outdated code/practices. My proposals are:

  • https://github.com/icyleaf/markd/pull/58
  • Replace the HTML extensions/mappings with the standard library's HTML module
  • https://github.com/icyleaf/markd/issues/54
  • https://github.com/icyleaf/markd/issues/55
  • https://github.com/icyleaf/markd/issues/56
  • Revisit specs coverage

There are few other things that I would like to propose but I will move them into separate issues. Let me know what you think.

devnote-dev avatar Apr 09 '23 07:04 devnote-dev

Can't use the stdlib module's HTML escaping because it escapes ' and breaks a test:

  1) Link reference definitions - 5
[foo]:␣/url␣'title

with␣blank␣line'

[foo]
     Failure/Error: [foo]: /url 'title

       Expected: "<p>[foo]: /url 'title</p>\n" + "<p>with blank line'</p>\n" + "<p>[foo]</p>\n"
            got: "<p>[foo]: /url &#39;title</p>\n" +
       "<p>with blank line&#39;</p>\n" +
       "<p>[foo]</p>\n"

     # spec/fixtures/spec.txt:2878

ralsina avatar May 13 '25 11:05 ralsina