1
0
mirror of https://github.com/e621ng/dtext_rb.git synced 2025-03-04 03:03:03 -05:00
Commit Graph

107 Commits

Author SHA1 Message Date
Earlopain
76de82ff2b
Surround section content in div
Makes it easier to style
2023-04-09 12:53:59 +02:00
Earlopain
efc5e6c0e5
Switch to standard gem layout
Part of c5bc7d1629

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-03 12:55:51 +02:00
Earlopain
4b08af9d09
Improve parsing of [color] when color is disabled
There are still issues. Headers don't get displayed correctly because
it's in inline mode, not main.
2023-04-02 22:43:20 +02:00
Earlopain
23f49dc8d9
Respect color permissions in reference comparison 2023-04-02 21:53:42 +02:00
Earlopain
f963fbaebd
Restrict allowed characters for internal anchors
Part of 8cc295d1ea

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-02 18:38:12 +02:00
Earlopain
6bca822ba7
Fix closing quote preceded by a header
Part of 9f9c89800c

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-02 18:15:52 +02:00
Earlopain
6f2f8eac2e
Remove header_with_id
e6 uses another syntax for this
2023-04-02 16:40:29 +02:00
Earlopain
4cf73756ef
Fix unclosed tags inside headers
fcc2081127

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-02 14:21:30 +02:00
Earlopain
f0b016d5df
Close open tags before [table] or [code]
a7e736f005

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-02 13:33:18 +02:00
Earlopain
ccec0eb3c4
Fix headers to not require blank line above
4de82a0436

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-02 13:15:51 +02:00
Earlopain
7fa785f4b2
Prevent list items from spanning muliple lines
285e401278

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 19:39:27 +02:00
Earlopain
33c97f1e9a
Fix block [spoiler] tag to close open inline tags
98f21f83b9

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 14:58:07 +02:00
Earlopain
50a908835e
Fix block [quote] tag to close open inline tags
bfc166b5a0

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 14:56:20 +02:00
Earlopain
e13e02f138
Fix [quote] tag to close open tags
27f4de9e62

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 14:45:38 +02:00
Earlopain
ec22c6b91a
Fix parsing of unexpected [/section] tags
d095ab1bd0

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 13:43:07 +02:00
Earlopain
67062a87ab
Fix parsing of unexpected [/quote] tags
1bfffe0e40

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 13:24:52 +02:00
Earlopain
075a189eef
Fix extraneous <br> tags in front of closing block tags
f411a14721

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 13:16:43 +02:00
Earlopain
422e3a9bc4
Fix [section] tag to close open tags
c0c5b57f3e

Co-Authored-By: evazion <noizave@gmail.com>
2023-04-01 00:27:19 +02:00
Earlopain
ec1a7ddf8c
Remove [tn]
Two total usages.
This isn't a secret table element, it probably stands for translators note.
2023-03-31 23:21:36 +02:00
Earlopain
b3ef8b8f1c
More efficient full test script
Turns out the previous version was slow af
From 2m4s to 31s for reading/parsing the whole reference file
2023-03-31 22:36:07 +02:00
Earlopain
c6cd30d7bc
Fix lists incorrectly closing previous tags
6627c65b9e

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-31 19:10:03 +02:00
Earlopain
6e76ea1c0b
Fix lowercasing of unicode wiki/post links
We have a few old links where this is the case.
New tags aren't allowed to contain these chars.

0571251616

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-29 16:31:20 +02:00
Earlopain
d10ed92e12
Remove unused DText.parse_inline
Simply pass the inline kwarg to DText.parse
2023-03-28 22:42:29 +02:00
Earlopain
668f84206c
Test dtext error message
Turns out the gsub in preprocess_for_tables already checks valid utf8 for us.
The only thing that isn't getting checked are null bytes, that has to happen
separately
2023-03-28 22:42:14 +02:00
Earlopain
418fe5a6f9
Remove need for thumbnails_left
Contains parts from 65a02be3d3
2023-03-28 19:50:52 +02:00
Earlopain
3af76a4703
Optimize append_segment_uri_escaped
Eliminate two unnecessary string allocations in append_segment_uri_escaped.
As a side effect, Unicode characters in URL parameters are now percent-encoded.

36031e0ff5

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-27 21:07:31 +02:00
Earlopain
cc987e26e1
Remove [nodtext]
Not documented, used in a whopping 20 messages total
2023-03-26 22:23:54 +02:00
Earlopain
488f5d4e0c
Fix unclosed [b] in quotes
c2fa567537

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-26 21:46:31 +02:00
Earlopain
14646904a8
Make urls case insensitive
5c6f0f40d6

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-26 20:39:59 +02:00
Earlopain
27653ff4c9
Use native html <details> element
bcc0b6bbcc

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-26 20:35:41 +02:00
Earlopain
a6a135949f
Remove nokogiri dependency
65a02be3d3

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-26 20:03:23 +02:00
Earlopain
d5fda0e197
Remove forum paged links
Not a single occurence of this in all the publically available dtext
2023-03-26 18:30:14 +02:00
Earlopain
0bc4ffa6c1
Remove ruby implementation, rename ragel class 2023-03-26 16:44:30 +02:00
Earlopain
a2d62bdc2b
Add my dumb script to compare outputs 2023-03-26 16:34:11 +02:00
Earlopain
95d88086e5
Remove mention code
`disable_mentions` is always set to true
2023-03-26 16:04:35 +02:00
Earlopain
1347bc1de1
Remove markup stripping code
a40cb0f35a

Co-Authored-By: evazion <noizave@gmail.com>
2023-03-26 14:59:14 +02:00
Earlopain
978640b904
Add test for lore color 2023-01-11 18:31:47 +01:00
faucet
47ef7d90b8 Add lore to [color] tags, remove appeal and favgroup links 2022-11-21 07:44:59 +00:00
Earlopain
19ae34082f
Fix named tag searches not working 2022-08-15 22:40:27 +02:00
Earlopain
302d3af297
[Links] Fix set link 2021-07-25 22:25:33 +02:00
Earlopain
5ba35be14a
[Links] Add post changes for specific post 2021-07-07 16:10:30 +02:00
Kira
3b83cea06f [Links] Add nofollow for more links 2021-01-17 12:31:57 -08:00
Kira
7c075fdc24 Fix wiki links with anchors
This forcefully lowercases anchor ids to match linking style
This also allows anchors to be used within wiki links by adding
a whitelist entry for the # character in certain urls.
2020-05-22 00:03:12 -07:00
Kira
a89945a72a Revert "Allow basic dtext in wiki links"
This reverts commit 0906067a1b.
2019-11-27 18:22:19 -08:00
Kira
0906067a1b Allow basic dtext in wiki links
This should probably be illegal, but it's widely used.
2019-11-27 18:19:14 -08:00
Kira
918bf260e6 Code blocks can't be inline 2019-11-04 15:57:58 -08:00
Kira
2e06f94f01 Maybe fix inline code tags being awful 2019-11-04 15:19:39 -08:00
Kira
80bda605c5 Change inline code to span and class 2019-11-04 14:55:02 -08:00
Kira
e0841d55b7 Fix nested inline code with escapes 2019-10-31 11:51:35 -07:00
Kira
6b34b8e17d Fix color parsing and update tests 2019-10-22 20:32:46 -07:00