question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slashes not honored

See original GitHub issue

Hello, thanks for mdast-util-from-markdown,

My report:

Say we have the following markdown file, example.md:

\ \\ \\\ \\\\

And our script, example.js, looks as follows:

var fs = require('fs')
var fromMarkdown = require('mdast-util-from-markdown')
var doc = fs.readFileSync('example.md')
var tree = fromMarkdown(doc)

console.log(tree.children[0].children)

After running, it yields:

  console.log
    [
      {
        type: 'text',
        value: '\\ \\ \\\\ \\\\',
        position: { start: [Object], end: [Object] }
      }
    ]

I would expect the values to be the same?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:23 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
wooormcommented, Apr 17, 2021

This is about two tings: a) parsing, b) formatting. For parsing, ASCII punctuation is all parsed the same. For formatting, the hash could result in a heading, the pipe can’t (in CommonMark) result into something. So the first needs to be escaped again, the other one doesn’t.

1reaction
pngwncommented, Apr 2, 2021

Apologies for wasting your time here, I can’t even reproduce the problem in the linked issue. Probably something else going on.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache Reverse Proxy - Virtual Host - Allow Encoded Slashes ...
I tried to publish the same npm package but without the slash and it is working. Therefore I am sure the problem is...
Read more >
Forward slash key not working : r/spectrex360 - Reddit
Hi, Probably a dumb question but my forward slash key is not working. ( this key: \ ) The key is position next...
Read more >
Forward slash not working - Visual Studio Feedback
I have to use comment shortcut which appears to be working. Along with the above issues, VS keeps crashing when I'm trying to...
Read more >
Using Forward or Backward Slashes Under Windows - IBM
This occurs because Windows does not recognize the path as an absolute-path if backward-slashes are translated into some incorrect characters. Forward-slashes ...
Read more >
Trailing Slash Redirect Not Working - WordPress.org
[This thread is closed.] Trailing slash redirect is not working for my website. I selected Add Trailing Slashes and checked trailing slashes redirect…...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found