-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
abbr not supported in markdown #73
Comments
oh, I didn't know about this, my reply would be same as here :) |
@mudassir0909 it seems that you closed the issue a bit too fast! I tried to use abbr, but I did not succeeded due to some limitations. Let me explain them. First, I think that each string is parsed from markdown to html separately. This means that you can't define the abbrs somewhere in the footer and use them anywhere else in the resume. Second, my tests show that the html generated by markdown-it is escaped by the elegant jsonresume theme. It should produce the following html: The <abbr title="Hyper Text Markup Language">HTML</abbr> specification. but the produced html is the following: The <abbr title="Hyper Text Markup Language">HTMLspecification. We can see that
|
Well, I tested it with the following string & it worked perfectly. "*[HTML]: Hyper Text Markup Language.\nThe HTML specification is maintained by the W3C." Added the above string inside the |
And yes, each string is parsed separately because there is no other way to globally compile everything & put them back to where they came from. For example, Also can you share what is your |
I tried with the exact same string as you: "*[HTML]: Hyper Text Markup Language.\nThe HTML specification is maintained by the W3C." and I get the following generated html: <li class="mop-wrapper">
<p>@@@@~*[HTML]: Hyper Text Markup Language.
<br>The HTML specification is maintained by the W3C.~@@@@</p>
</li> Of course, the When I use this string: "this is HTML !\n*[HTML]: Hyper Text Markup Language\n" and I get the following generated html: <li class="mop-wrapper">
<p>@@@@~this is <abbr title="Hyper Text Markup Language">HTML</abbr> !</p>
<p>~@@@@</p>
</li> This time, the It seems that the final |
strange! let me check this weekend |
Hi @mudassir0909, did you had time to test it? |
I tried with the markdown that you copied: "summary": "conception and QA",
"highlights": [
"this is HTML !\n*[HTML]: Hyper Text Markup Language\n",
"conception of a distributed system" And the result is showing some annoying I don't have any idea on where it could come from. I'm using debian jessie with a standard nvm install of npm. Searching Any help would be gladly welcome! |
Further testing shows me that the strange strings are due to the final Without the final |
Ah! Maybe compatibility issue with the OS, if you have a VM, can you try publishing the same from ubuntu & see if the issue still persists? Also, if possible open up node console & include |
The problem does not come from debian: I've just tested with Ubuntu Xenial (a real Ubuntu, not a VM) and I get the same result. What OS are you using? Where does that come from? I thought it could come from the encoding: $ file resume.json
resume.json: UTF-8 Unicode text, with very long lines What is your encoding? |
Could you help me test |
Assume you have node installed on your machine, you can open node console using the following command
Once you enter the console you could do
See if the output exports special characters P.S. Ensure you have |
By the way here is my encoding
I'm on OS X El Capitan |
Also, did you publish your resume somewhere? can I have a look at it? |
Here is the result of my test: >node
> var markdown = require('markdown-it')({
... breaks: true
... }).use(require('markdown-it-abbr'));
undefined
> markdown.render("this is HTML !\n*[HTML]: Hyper Text Markup Language\n")
'<p>this is <abbr title="Hyper Text Markup Language">HTML</abbr> !</p>\n'
> .exit So, it seems to work! As my file is in UTF-8 and yours is in ASCII, this could explain the different behaviour. Could please add an My resume is not published anywhere at this time (it is not finished yet as there is still some bugs), but I can send it to by private mail. |
shoot me an email at mudassir.dev @ gmail.com, attach your resume.json file, it'll make things easier for me |
It might be due to differences in system's locales. Here are mines: >locale
LANG=fr_FR.utf8
LANGUAGE=
LC_CTYPE="fr_FR.utf8"
LC_NUMERIC="fr_FR.utf8"
LC_TIME="fr_FR.utf8"
LC_COLLATE="fr_FR.utf8"
LC_MONETARY="fr_FR.utf8"
LC_MESSAGES="fr_FR.utf8"
LC_PAPER="fr_FR.utf8"
LC_NAME="fr_FR.utf8"
LC_ADDRESS="fr_FR.utf8"
LC_TELEPHONE="fr_FR.utf8"
LC_MEASUREMENT="fr_FR.utf8"
LC_IDENTIFICATION="fr_FR.utf8"
LC_ALL= What are yours? |
|
And even then this issue is probably related to |
As explained in my previous comment, everything seems to work very well with Do you really think I should try to have a deeper look at |
As mentioned in the email, it could be due to hackmyresume. If you are not having any issues when you host your resume(jsonresume) locally then it's probably hackmyresume See https://github.com/mudassir0909/jsonresume-theme-elegant#contributing on how to host your resume locally |
It works very well with I'll have to dive into Thanks a lot for your patience! EDIT: replace |
no problem :) closing the issue then |
I didn't get this part |
I edited the previous comment. How do you manage to render the resume without |
Aha, this even I've no clue, although this might help https://github.com/mudassir0909/jsonresume-theme-elegant/blob/master/serve.js#L47 We use this script to render the theme locally, you could do the similar thing |
So... What is I mean, it's more than a theme, it is a fully usable standalone tool! |
markdown has been recently added as a new feature of this theme, it works well and is a pleasure to use.
Unfortunately, the markdown parser does not support the abbr, which identified as a bug in marked: markedjs/marked#27
The issue suggest to use another markdown parser known as markdown-it: markdown-it.
I let you decide what to do.
The text was updated successfully, but these errors were encountered: