-
Notifications
You must be signed in to change notification settings - Fork 52
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
Updating remark, unified etc #342
Conversation
Set and Promise are now global by default.
This commit is about updating how the id of the footnote is retrived. Since, mdast-util-to-hast/issues/14, footnote link backref are wrapped inside the paragraph which is wrapped inside the `li` tag. Using unist-util-visit-parents instead of unist-util-visit to retrive the `li` tag.
Related to previous commit. Cf. syntax-tree/mdast-util-to-hast#14
**This commit only convert new identifiers to string.** Identifiers used to be strings but in the previous version of this plugin, identifiers were converted to numbers. Now the type is preserved. Adapt the plugin to the commit of mdast-util-to-hast#fd38c454 See the issue: syntax-tree/mdast-util-to-hast#32 It updates the order of footnotes to a more coherent one. But identifiers no longer allowed to be number.
Since : - syntax-tree/mdast-util-to-hast#32 - khttps://github.com/syntax-tree/mdast-util-to-hast/pull/15
Adapt the code to : syntax-tree/mdast-util-to-hast#32
Can I help here for somthing? |
Hi, I'm still working on it. I got a weird case. Since : remarkjs/remark#424 Spaces in inline code are preserved. So a test case doesn't pass. The test is : New line: `\
` The old result was « nothing ». Since the inline code became empty it was deleted. I don't understand the new behavior. I think it's not a useful test case and we should just ignore it. I have plenty of test case to study. Can I just skip it and update the snapshot ? I will leave a issue on remark. GFM and CommonMark replace the new line by a space. Nothing interesting since the chose of remark seems legit. |
I'm not sure I understand what the issue is, to me remark seems to default to the correct behavior. Apparently you are seeing something different that is not consistent with Here's how the case you present should be rendered IMO: New line: `\
` => <p>New line: <code>\ </code></p> Basic example showing this behavior: https://github.com/vhf/remark-playground . Using |
Yeap ! Here an example : https://github.com/arobase-che/remark-playground/tree/parsed I don't know why your version works but mine is problematic with rebber.
I totally agree with you ^^ PS: Sorry about my English ._. |
Btw, I'm suppose to edit the fixtures by hand ? |
Here's my example again: const inspect = require('util').inspect
const vfile = require('to-vfile')
const report = require('vfile-reporter')
const unified = require('unified')
const markdown = require('remark-parse')
const remark2rehype = require('remark-rehype')
const html = require('rehype-stringify')
unified()
.use(markdown, {gfm: true})
.use(() => (vfile) => { console.warn(inspect(vfile, false, 9999, true)) })
.use(remark2rehype)
.use(() => (vfile) => { console.warn(inspect(vfile, false, 9999, true)) })
.use(html)
.process(vfile.readSync('example.md'), function(err, file) {
console.error(report(err || file))
console.log(String(file))
}) We see that
and then
I'll check all the places where
That's probably the safest thing to do, yes. Are there a lot of HTML changes? Will the HTML changes cause issues on zds? |
Ok :)
Enough to be upsetting :( Example: > Here is one
> Here is another and not the same |
Then please make sure people agree with these changes before we land this PR :) |
FOr quotes it clearly is what we want. |
This branch is tracking @arobase-che 's progress on upgrading remark, unified, etc