Menu

#25 URLs with embedded syntax highlighting convert to malformed link

None
open
nobody
2020-06-14
2020-05-17
Anonymous
No

Originally created by: fritzophrenic

Original report by Anonymous.


With the following file:

$ http://202.112.51.227:58314/
$ http://github.com

Run:

vim -X -i NONE -f  +"let g:html_no_progress=1" +"let g:html_ignore_folding=1" +"let g:html_use_css=0" +"let g:html_pre_wrap=0" +"TOhtml" -ncwqa a.sh

Got the following results:

</head>
<body bgcolor="#ffffff" text="#000000" onload='JumpToLine();'>
<font face="monospace">
<span id="L1" ><font color="#af5fd7">1&nbsp;</font></span>$ <a href="http://">http://</a><font color="#c00000">202</font>.<font color="#c00000">112</font>.<font color="#c00000">51</font>.227:58314/<br>
<span id="L2" ><font color="#af5fd7">2&nbsp;</font></span>$ <a href="http://github.com">http://github.com</a><br>
<span id="L3" ><font color="#af5fd7">3&nbsp;</font></span><br>
</font>
</body>

It can be seen that, the URL with IP address was not recognized and parsed correctly.

Discussion

  • Anonymous

    Anonymous - 2020-05-17

    Originally posted by: fritzophrenic

    Original comment by Yuxin Wu (Bitbucket: ppwwyyxx, GitHub: ppwwyyxx).


    Sorry, forgot to login before posting. I don’t know Bitbucket allows that 😅

    Adding +"hi clear Constant" can workaround it.

     
  • fritzophrenic

    fritzophrenic - 2020-06-14

    I think I’ll need to rework how the links are processed if embedding formatting within the links is needed so this won’t be easy. Right now IIRC it’s just a simple :substitute command that runs after the conversion is done.

     
  • fritzophrenic

    fritzophrenic - 2020-06-14
    • summary: Cannot recognize URLs with IP address --> URLs with embedded syntax highlighting convert to malformed link
    • Description has changed:

    Diff:

    
    
    • Milestone: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.