commonmark / cmark

CommonMark parsing and rendering library and program in C
Other
1.63k stars 546 forks source link

Any reason `escape_html` (or `html.h`) doesn't exist in a header file? #136

Closed gjtorikian closed 8 years ago

gjtorikian commented 8 years ago

For the Commonmarker Ruby wrapper, I've been using houdini_escape_html0 directly to implement escaping HTML. I forgot why, so today when I changed it to escape_html, I got the following error:

dyld: lazy symbol binding failed: Symbol not found: _escape_html
  Referenced from: /Users/gjtorikian/Development/commonmarker/lib/commonmarker/commonmarker.bundle
  Expected in: flat namespace

html.h doesn't exist, but houdini.h does. Is there any specific reason for this? In the end my code does end up just calling houdini directly as escape_html does but I'd like to rely on the official libcmark pattern.

If there isn't a specific reason, I'll open a PR.

jgm commented 8 years ago

Neither of these is part of the public API. The declaration for the main function defined in html.c lives in cmark.h, which is the only public header file.

+++ Garen Torikian [Jun 07 16 14:33 ]:

For [1]the Commonmarker Ruby wrapper, I've been using houdini_escape_html0 directly to implement escaping HTML. I forgot why, so today when I changed it to escape_html, I got the following error: dyld: lazy symbol binding failed: Symbol not found: _escape_html Referenced from: /Users/gjtorikian/Development/commonmarker/lib/commonmarker/c ommonmarker.bundle Expected in: flat namespace

html.h doesn't exist, but houdini.h does. Is there any specific reason for this? In the end my code does end up just calling houdini directly as escape_html does but I'd like to rely on the official libcmark pattern.

If there isn't a specific reason, I'll open a PR.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, [2]view it on GitHub, or [3]mute the thread.

References

  1. https://github.com/gjtorikian/commonmarker
  2. https://github.com/jgm/cmark/issues/136
  3. https://github.com/notifications/unsubscribe/AAAL5GderZ2dF_K1oA5-pyHCOY1cqg8Zks5qJeO9gaJpZM4IwYjU
gjtorikian commented 8 years ago

Ah, ok.