mirror of
https://github.com/waynesutton/markdown-site.git
synced 2026-01-12 04:09:14 +00:00
fix: plain text code blocks now wrap text properly
This commit is contained in:
@@ -27,6 +27,10 @@ The goal: AI services fetch `/raw/{slug}.md` and parse clean markdown without HT
|
||||
I attempted to load and read the raw markdown at the URL you provided but was unable to fetch the content from that link. The page could not be loaded directly and I cannot access its raw markdown.
|
||||
```
|
||||
|
||||
```
|
||||
The page could not be loaded with the tools currently available, so its raw markdown content is not accessible.
|
||||
```
|
||||
|
||||
**Perplexity:**
|
||||
|
||||
```
|
||||
@@ -89,8 +93,14 @@ Added explicit bypass for known AI user agents:
|
||||
|
||||
```typescript
|
||||
const AI_CRAWLERS = [
|
||||
"gptbot", "chatgpt", "chatgpt-user", "oai-searchbot",
|
||||
"claude-web", "claudebot", "anthropic", "perplexitybot"
|
||||
"gptbot",
|
||||
"chatgpt",
|
||||
"chatgpt-user",
|
||||
"oai-searchbot",
|
||||
"claude-web",
|
||||
"claudebot",
|
||||
"anthropic",
|
||||
"perplexitybot",
|
||||
];
|
||||
|
||||
if (isAICrawler(userAgent)) {
|
||||
@@ -112,7 +122,7 @@ exports.handler = async (event) => {
|
||||
return {
|
||||
statusCode: 200,
|
||||
headers: { "Content-Type": "text/plain; charset=utf-8" },
|
||||
body: markdownContent
|
||||
body: markdownContent,
|
||||
};
|
||||
};
|
||||
```
|
||||
|
||||
@@ -8,6 +8,21 @@ layout: "sidebar"
|
||||
|
||||
All notable changes to this project.
|
||||
|
||||
## v1.28.2
|
||||
|
||||
Released December 25, 2025
|
||||
|
||||
**Plain text code block wrapping**
|
||||
|
||||
- Code blocks without a language specifier now wrap text properly
|
||||
- Fixed horizontal overflow for long error messages and prose in code blocks
|
||||
- Updated inline vs block code detection logic
|
||||
- Inline code: short content (< 80 chars), no newlines, no language class
|
||||
- Block code: longer content or has language specifier
|
||||
- Text wrapping uses `pre-wrap` styling applied via SyntaxHighlighter props
|
||||
|
||||
Updated files: `src/components/BlogPost.tsx`, `src/styles/global.css`
|
||||
|
||||
## v1.28.1
|
||||
|
||||
Released December 25, 2025
|
||||
|
||||
Reference in New Issue
Block a user