ctrlcctrlv / infinity

A vichan fork permitting users to create their own boards
Other
318 stars 149 forks source link

[code] tags broken by new RTL support #471

Closed ctrlcctrlv closed 9 years ago

ctrlcctrlv commented 9 years ago

@8n-tech

jaw-sh commented 9 years ago

@ctrlcctrlv Parser now encapsulates entire codeblocks.

Yo<code>Hello
World
Foo
Bar</code>Yo

Parses to

<p>Yo
<code>Hello<br />
World<br />
Foo<br />
Bar</code>
Yo</p>

Please review commit d7b511270aa561732822e8ec3683da6c469da79d This works by RegEx.

czaks commented 9 years ago

I made one commit in vichan, which actually made [code] tags work. Btw. the correct tag for multiline code is

, not .
20 kwi 2015 12:47 "N" notifications@github.com napisał(a):

@ctrlctrlv Parser now encapsulates entire codeblocks.

YoHello World Foo BarYo

Parses to

Yo Hello
World
Foo
Bar
Yo

Please review commit d7b5112 https://github.com/ctrlcctrlv/infinity/commit/d7b511270aa561732822e8ec3683da6c469da79d This works by RegEx.

— Reply to this email directly or view it on GitHub https://github.com/ctrlcctrlv/infinity/issues/471#issuecomment-94419976.

jaw-sh commented 9 years ago

@czaks it's a <pre> within a <code> tag. I was demonstrating how the parser worked.

czaks commented 9 years ago

We can't tell we have a proper parser, while we have a bunch of regexps. I still can't see how this parser handles tags, urls, unicode, another code tags, embedded in a code tag, which by definition, should preserve the original code. This is what my patch does. I will send, which patch is it exactly later, but you can atm search git history for [code]. 20 kwi 2015 14:16 "N" notifications@github.com napisał(a):

@czaks https://github.com/czaks it's a

within a tag. I was demonstrating how the parser worked.

— Reply to this email directly or view it on GitHub https://github.com/ctrlcctrlv/infinity/issues/471#issuecomment-94436653.

jaw-sh commented 9 years ago

The job of this was to parse individual lines into paragraphs that could then determine directions for international users.

If you would like to trash that in favor of what you have, go for it. I don't care.

ctrlcctrlv commented 9 years ago

@czaks

We are preferring @8n-tech's parser due to RTL support. 8ch.net has one large board in Arabic (8ch.net/egy) and this is important to me, and I think it is a better direction to go for the software in case someone makes e.g. 8ch for Arab world, since the point is being international. If yours has RTL as well I can maybe switch to it. I agree with you that regex is not a proper parser.