You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do not know if this intentional but in my mind markdown tags stand alone without context. And Github seems to agree with me (see very last line showing same idea).
On 5 Feb 2020, at 14:45, NCarson wrote:
Given two commands, the first ending in newline and the second with
more text; only the the second will print a header.
```shell
$ echo '#h1
' | ./mdless -P ; echo '#h1
hello' | ./mdless -P
```
gives (extra blank lines removed):
```
#h1
h1
======================================================================================================================
hello
```
I do not know if this intentional but in my mind markdown tags stand
alone without context. And Github seems to agree with me (see very
last line showing same idea).
In any case when this line
https://github.com/ttscoff/mdless/blob/develop/lib/mdless/converter.rb#L190:
```ruby
headers = input.scan(/^((?!#!)(\#{1,6})\s*([^#]+?)(?:
#+)?\s*|(\S.+)\n([=-]+))$/i)
```
is changed to:
```ruby
headers = input.scan(/^((?!#!)(\#{1,6})\s*([^#]+?)(?: #+)?[
\t]*|(\S.+)\n([=-]+))$/i)
```
(last `\s` changed to `[ ^t]`) fixes my test case.
Although I dont know if that causes any other repercussions.
Github rendering of `# test\nEOF`:
# test
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#45
Given two commands, the first ending in newline and the second with more text; only the the second will print a header.
gives (extra blank lines removed):
I do not know if this intentional but in my mind markdown tags stand alone without context. And Github seems to agree with me (see very last line showing same idea).
In any case when this line https://github.com/ttscoff/mdless/blob/develop/lib/mdless/converter.rb#L190:
is changed to:
(last
\s
changed to[ ^t]
) fixes my test case.Although I dont know if that causes any other repercussions.
Github rendering of
# test\nEOF
:test
The text was updated successfully, but these errors were encountered: