Skip to content

Instantly share code, notes, and snippets.

@hail2u
Last active August 29, 2015 13:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hail2u/10706879 to your computer and use it in GitHub Desktop.
Save hail2u/10706879 to your computer and use it in GitHub Desktop.
GFMの見出しリンクで削除される文字列を検証

Test!"#$%&'()*+,-./0123456789:;=<>?@[\]^_`{|}~ ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶·¸¹º»¼½¾¿À

  • 小文字に変換される
  • 空白は-に変換される
  • a-zA-Z-_はそのまま
  • Àより前の半角記号はほとんど削除される
    • ただしªµºは残る
  • ソフトハイフンが挙動不審
  • 残りはUTF-8でURLエンコード
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment