And with this commit I am done with core!
https://github.com/discourse/discourse/commit/d941ed90d6c12a8bf0c8b922076cb6eca8114816
There are no open issues any more, so I am moving on to fixing up plugins.
And with this commit I am done with core!
https://github.com/discourse/discourse/commit/d941ed90d6c12a8bf0c8b922076cb6eca8114816
There are no open issues any more, so I am moving on to fixing up plugins.
It would be great if we could use this transition as an opportunity to add correct rendering of mathematical equations. There is a common mark plugin to handle this https://github.com/classeur/markdown-it-mathjax
I donāt know here to write. In this topic. The problem with Russian tags. If the category slug is normally displayed as a link, then the Russian characters in tags - links are not.
That isnāt actually related to markdown-it, it is an existing issue
I enabled the typographer here
Note, smartquotes can be done better. Ideally - with autoselecting proper characters, depending on used language. Existing implementation is a trade off between simplicity and value.
Correct implemenattion in JS will require a lot of unicode constants for language detect. That will make client code too big (read as ācan be done on server side onlyā).
There is a mathjax plugin, though if youāre hosted here, that doesnāt help you.
We probably plan to add mathjax to business and up, just need to figure out how to make it light weight enough. After I am done implementing the bbcode plugin I will move to mathjax. Also katex is a reasonable middle-ground which I will explore.
In 99.9% such issues are caused by poor languages support by native JS regexps.
https://github.com/markdown-it/linkify-it/blob/master/lib/re.js - this can be used as example of how to replace āordinaryā javascript regexps with proper black magic.
Since all required unicode constants already available via markdown-it / linkify-it, it should not be difficult to fix hashtag plugin.
Kick me, when you find good concept for math expressions. When i investigated this topic, i found 3 problems and postponed everything until better times:
Somelink - just another link on the internet fails cause of the tag category plugin
OK, I took a shot at the plugin.
For now:
I used $
and the jgm suggested heuristic as to handle cases like 100$ + 200$
I selected TeX cause that is what math.stackexchange.com seem to use so there is lots of prior art.
I embedded the fonts in the plugin, and load on demand.
On Monday we (I) plan to deploy this change to the Standard Tier
Found a slightly weird thing - for some reason this doesnāt get recognised as a mention
This is a line of text
@sam
This is a line of text
@sam
But this works fine
This is a line of text
@sam
This is a line of text
Could you explain details, why $inline$
syntax will have no conflicts?
$
inside (as part of variable name, comment etc)?Yeah, that next line is impacting my plugin as well
@sam, I do have another issue Iām struggling to work around. It seems markdown-it is only getting setup when the composer is open. My main plugin, is the checklist plugin. Everything works fine when the composer was opened and then closed (without refreshing the page)
Knowing that doesnāt probably make a lot of sense, here is a video of it
http://nimb.ws/UNn5gb
The error I receive is
Error: Could not find module `pretty-text/engines/markdown-it/helpers` imported from `discourse/plugins/discourse-plugin-checklist/lib/discourse-markdown/checklist` at requireFrom (discourse-loader:128) at reify (discourse-loader:106) at mod.state (discourse-loader:163) at tryFinally (discourse-loader:30) at require (discourse-loader:162) at eval (pretty-text/engines/discourse-markdown-it:208) at Array.forEach () at setup (pretty-text/engines/discourse-markdown-it:206) at buildOptions (pretty-text/pretty-text:93) at getOpts (discourse/lib/text:23)
What is mind-boggling is it works just fine once the composer is opened and then closed. It only fails to find said helper import if the composer is never opened (you donāt have to type anything in the composer either).
Here is the code Iāve come up with thus far.
https://github.com/cpradio/discourse-plugin-checklist/compare/markdown-it?expand=1
The error is being generated from (which I did not alter for markdown-it ā not sure I need to)
https://github.com/cpradio/discourse-plugin-checklist/blob/master/assets/javascripts/discourse/initializers/checklist.js.es6#L47
Edited: Changed the video URL, as I didnāt realize the dev tools was not captured.
Iāve got to say that this is probably my absolute favourite improvement that this new engine brings ā being able to use double hyphens to produce spaced en dashes is amazing.
Out of curiosity, why the decision to disable the typographer by default? Is it likely to cause issues in languages other than English? Or is it out of fear of breaking existing content on rebake? Given that Discourse is primarily about the reading experience, I think itād be good to by default enable features like the typographer which improve legibility.
We circled back on this, we may enable it by default in a few weeks, just living with it for a bit now
you would escape it like so: $\$a$
I really do not think so, can you think of an example where this is needed?
No, i just seen something strange on math.stackexchange and asked question about reasons, because you have more experience in this area
Very marginally, I have only been doing MathJax for a few days