Same article on dev.to
Here's my configuraiton (in data.json
):
"censorText": [
{
"entry": "/ (\\^\\w+)$/gm",
/* same article on [dev.to](https://dev.to/somidad/stop-obsidian-wrapping-code-and-enable-scrolling-47oo) */ | |
/* it only works on Reading view */ | |
/* https://forum.obsidian.md/t/horizontal-scrolling-in-the-code-block/55789/2 */ | |
.markdown-rendered code { | |
white-space: pre; | |
} |
Same article on dev.to
Here's my configuraiton (in data.json
):
"censorText": [
{
"entry": "/ (\\^\\w+)$/gm",
import { saveAs } from "file-saver"; | |
function DownloadContent() { | |
const download = () => { | |
const blob = new Blob(["Hello, world!"], {type: "text/plain;charset=utf-8"}); | |
saveAs(blob, "hello, world.txt"); | |
} | |
return ( | |
<button onClick={download}>Download</button> | |
) |
/* Yello hyperlink on green background */ | |
.page-ref { | |
color: #E0D772; | |
} | |
/* Yellow underline on green background */ | |
.block-ref { | |
border-bottom-color: #E0D772; | |
} |
function Component() { | |
const onChange = (e) => { | |
const file = e.target.files?.[0]; | |
if (!file) { | |
return; | |
} | |
const reader = new FileReader(); | |
reader.addEventListener('load', () => { | |
console.log(reader.result); | |
}); |
name: Publish | |
on: | |
#push: | |
#branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest |
const { readFileSync, writeFileSync } = require("fs"); | |
function indexOfUnicode(s, u) { | |
let i = -1; | |
for (i = 0; i < s.length; i++) { | |
if (s.charCodeAt(i) === u) { | |
break; | |
} | |
} | |
return i; |
# https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files | |
- name: Check if there is any change | |
id: get_changes | |
# deprecated. see https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ | |
#run: echo "::set-output name=changed::$(git status --porcelain | wc -l)" | |
run: echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT | |
- name: Do something if there is any change | |
if: steps.get_changes.outputs.changed != 0 | |
run: do something |